Difference between revisions of "Co-op Documentation"

From WormBaseWiki
Jump to navigationJump to search
 
(51 intermediate revisions by 8 users not shown)
Line 1: Line 1:
==Current Tasks==
 
===Tasks In Progress===
 
====Issue Tracker & Bug Fixes====
 
*'''Details'''
 
*'''In Progress'''
 
*'''Completed'''
 
**[https://github.com/WormBase/website/issues/151 #151 - Very useful view for users, from the old site]
 
***[http://dev.wormbase.org:8023/tools/epic/run?name=JC8.10a;class=CDS CDS JC8.10a]
 
***[http://dev.wormbase.org:8023/tools/epic/run?name=WBGene00006763;class=Gene Gene unc-26]
 
***Ported code from classic site and reformatted to adhere to Model-View-Controller structure
 
***Adjusted to prevent use of Ace Browser (Configuration). Changed tmp image creation/usage to follow blast/blat method instead.
 
***Replaced use of image file to display error with standard message display
 
***Also ported 'Genetic Map' tool
 
****Added as a sidebar tool for genes and rearrangements as well as a drop-down tool
 
***Ported and corrected e-PCR tool as well
 
**[https://github.com/WormBase/website/issues/135 #135 - Port the data model CGI to the new site]
 
***[http://dev.wormbase.org:8023/tools/schema Drop-down Index Page]
 
***[http://dev.wormbase.org:8023/tools/schema/run?class=Gene Gene Model]
 
***[http://dev.wormbase.org:8023/species/c_elegans/gene/WBGene00006763#f--10 unc-26 Schema widget]
 
***Added such that tool should appear wherever tree display appears
 
***Created basic index page for drop-down
 
***Implemented by adding case to controller for redirecting schema requests to tree display, and adjusted templates accordingly
 
**[https://github.com/WormBase/website/issues/139 #139 - Need to port (or create anew) a Rearrangment page/display]
 
***[http://dev.wormbase.org:8023/species/c_elegans/rearrangement/nDf50#01234--10 nDf50(dev)]
 
***[https://github.com/WormBase/website/commit/abac39 Commit abac39]
 
**[https://github.com/WormBase/website/issues/132 #132 - TreeFam IDs on Gene > Homology should link to Treefam, not to WB]
 
***Changed to use "search" in external_urls (Originally using text2link)
 
***[https://github.com/WormBase/website/commit/423c0f Commit 423c0f]
 
**[https://github.com/WormBase/website/issues/127 #127 - Registered Users table broken on MyWormBase for admins]
 
***Changed view to create "row" separately from "obj" (Originally just manipulated obj and pushed onto rows)
 
***Changed reference used to store role info (Originally wasn't returning role info correctly)
 
***[https://github.com/WormBase/website/commit/3e7c48a Commit 3e7c48a]
 
**[https://github.com/WormBase/website/issues/82 #82 - evidence in phenotype dataTable]
 
***Changed RNAi evidence retrieval to match alleles & transgenes
 
***[https://github.com/WormBase/website/commit/91da482 Commit 91da482]
 
***[https://github.com/WormBase/website/commit/dc5c2b4 Commit dc5c2b4]
 
 
====Tool Corrections====
 
*'''Details:'''
 
**Tree Display Issues:
 
***''Note: tree display changes postponed because users are primarily dev and curators, primary focus is general correct function for ws230 release''
 
***Clicking opens tree display on separate page
 
****Create button for opening in new page and keep navigation in the widget (in an iframe)
 
****Clicking on objects with corresponding pages should actually open those pages with the tree display widget opened and focused
 
*****Allows better navigation using tree display
 
***Need to test that all types of object can be displayed (particularly links to external images that were using hack method to display)
 
**Blast/Blat Issues:
 
***Add Image Map for alignment image that links to the corresponding hit alignment below
 
***Sidebar architecture
 
*'''In Progress:'''
 
**Tree Display Issues:
 
***"Can't locate object method "run" via package "WormBase::API::Service::tree" error
 
****Temporarily removing inclusion of TreeSubs at least allows loading and using
 
*'''Related/Example Links:'''
 
**Tree Display Issues:
 
***[http://dev.wormbase.org:8023/species/c_elegans/gene/WBGene00006763#f--10 unc-26] (dev)
 
**Blast/Blat Issues:
 
***[http://dev.wormbase.org:8023/tools/blast_blat dev]
 
***[http://legacy.wormbase.org/db/searches/blast_blat old]
 
*'''Completed:'''
 
**'''Blast/Blat Issues:'''
 
***mkdir error - doesn't have permissions
 
****<del>Temporarily solved by running server via sudo (probably not viable long term)</del>
 
****chmod -R a+rwx /usr/local/wormbase/shared/tmp/blast_blat
 
****chmod -R a+rwx /usr/local/wormbase/shared/tmp/media/images/blast_blat
 
***Corrected UI as discussed in [https://github.com/WormBase/website/issues/49 issue 49] on github tracker
 
****Added version selection and sorted list
 
***Incorrect linking (genes linking to common names instead of WB IDs. Call to non-existent "common_name" method)
 
****e.g. beta.wormbase.org/species/c_elegans/gene/lin-1 instead of beta.wormbase.org/species/c_elegans/gene/WBGene00002990
 
****Was treating the name of the hit as the name of the corresponding sequence, gene, and protein resulting in invalid links
 
****Was returning links using incorrect hash that tried to mimic what _pack_obj returns
 
****Changed to fetch sequence object from database, determine actual gene and protein, and return using _pack_obj
 
***Drop-down navigation list on left of results display doesn't work (trying to switch to another result doesn't do anything)
 
****Corrected to link to start of display for corresponding result
 
****Would be nice to have drop-down hover with the screen focus, so that the user doesn't have to click back or scroll to the top to use it again
 
****Changed sample nucleotide query to include second nucleotide to demonstrate navigation using drop-down
 
***"About the BLAT algorithm" link is incorrect
 
****Created template and updated link
 
***Corrected issue with cross-linking between results with same hits (Alignment View links on results page)
 
***Corrected Gbrowse [Genome View] link and embedded image for genomic alignments
 
****Changed to combine hits "HSP(#)" tracks into single track
 
***Changed retrieval of BLAT databases from being manually defined in hash to being automatically read from the specified database directory in the config (like blast)
 
****Method for determining BLAT databases in UI list was to manually append "[BLAT]" to genomic BLAST database names
 
****Changed to read from blat_databases attribute
 
***Changed method for running from using gfServer and gfClient to use the standalone blat
 
***Need to handle error when no blat results
 
****Corrected to inform user and link back to search page
 
***Test proxy issues
 
****Gbrowse images
 
****tmp_image_dir (session binding)
 
*****Handled by Todd
 
***Corrected reset button on search page to reset fields correctly
 
***Corrected issue with searching against EST database
 
****Issue was actually due to the disabling of database drop-down when only one element
 
***Changed blat to use fasta files in blast directories when searching
 
***Changed result page navigation drop-down to use onchange instead of onclick
 
***Disabled linking for CHROMOSOME pages due to loading issues (sequence is too large and blocks acedb for a while)
 
**'''Tree Display Issues:'''
 
***Expand/Collapse Nodes and View schema links have invalid links (.../tools/tools/tree/run/...)
 
***Found issue where Controller passes param that is an array of array refs, but the method treats it as if they have been merged
 
****Created flatten function "sub flatten {return map { ref($_) eq 'ARRAY' ? flatten(@$_) : $_ } @_}"
 
****built-in or more efficient method in perl to handle this?
 
***Embedded links to objects were invalid. Only links to expand/collapse list tags were valid
 
****Linking was relative to current page which was assumed to be /tools/tree/run
 
****Changed to always link to tools/tree/run (for ws230 release)
 
****Changed to open in new tab/window instead of changing the current page
 
***Model display issues
 
****Link to object where name had # in name were incorrect
 
*****Fixed by substituting ? for # when generating link
 
****View schema link broken for Model objects
 
 
====General Page Corrections====
 
*'''Details:'''
 
**Visiting all minor pages and verifying that all fields display information correctly (checking behaviour for sparsely- & densely-populated)
 
**Continuing with fatal non-compliance checks for all pages
 
**Standardization and optimization
 
***Converting methods to use standard such as _pack_obj/_get_evidence where necessary
 
***Converting templates to use macros such as build_data_table instead of building manually
 
*'''In Progress:'''
 
**Feature Page
 
***Should the SO_term in the overview be removed/changed?
 
**Gene Class
 
***If gene class uses other_name (e.g. mig->ppn) shouldn't the genes for both be accessible on the ppn page
 
****Searching 'mig' gives links to 2 separate pages, where one has mig info and the other has ppn info but the names are opposite
 
*****Both of these pages have ppn as the title when visited
 
**Picture
 
***Unable to find any pages for this class
 
****Has API methods, templates, and is defined in wormbase.conf
 
**Enabling precaching for widgets/pages with significant load times
 
***Set "precache true" in wormbase.conf under the widget/page
 
*'''Related/Example Links:'''
 
**[[Example Pages]]
 
*'''Completed:'''
 
**Analysis Page -> Overview Widget
 
***Added highlight box back (was originally empty, but now WBID is automatically added)
 
**Anatomy_function Page -> Associations Widget
 
***Added references and body parts involved for Anatomy functions
 
****Reason: No page for anatomy functions and the data should be displayed (also assists in navigation)
 
****[http://dev.wormbase.org:8023/species/c_elegans/anatomy_term/WBbt:0004522#1--10 WBbt:0004522]
 
**Expression_cluster Page -> Clustered_data, Genes, Overview(Remarks) Widgets
 
***Corrected invalid hash references, and corrected overlap issue for remarks
 
****<nowiki>http://dev.wormbase.org:8023/species/c_elegans/expression_cluster/[cgc5767]:cluster_88#01243--10</nowiki>
 
**Feature Page
 
***Corrected improperly displayed (overlapping) remarks in overview
 
***Corrected array ref issues in associations widget
 
**Gene Page
 
***Corrected improper retrieval of phenotypes_not_observed
 
**Gene Class
 
***Changed tables in 'Current Genes' and 'Previous Genes' widgets to use build_data_tables
 
****Consistent, paginated, searchable
 
***Issue with sparse gene info for previous genes
 
**Gene Regulation
 
***Corrected reference issue for 'molecule regulator' field and modified 'regulates' field to be more clear
 
**GO_term
 
***Issue with size: If evidence is shown, GO_term cannot load if it contains > 100 motifs. Otherwise, all GO_terms can load
 
****Note: largest number of motifs is 880
 
***Classic site displays human diseases, beta doesn't
 
****Notes: Tried adding widget to conf (didn't work). Not sure where/how info is being read from for either site
 
***[http://dev.wormbase.org:8023/species/c_elegans/go_term/GO:0018996 GO:0018996] (Dev Version)
 
***[http://legacy.wormbase.org/db/ontology/gene?name=GO%3A0018996;class=GO_term GO:0018996] (Classic Version)
 
**Interaction
 
***Both classic and beta weren't displaying all interactions (possibly due to recent changes to model)
 
****All information shown was regarding the first(alphabetically) interaction_type (i.e. treating info as scalar instead of array)
 
***Removed numerous fields and created general summary table showing how everything is related
 
***Should the Interactors widget be removed/changed? Doesn't seem to provide much useful info
 
****Should just be replaced by Interactions Cytoscape view
 
***[http://dev.wormbase.org:8023/species/c_elegans/interaction/WBInteraction0004639 WBInteraction0004639] (Dev Version)
 
***[http://legacy.wormbase.org/db/gene/interaction?name=WBInteraction0004639;class=Interaction WBInteraction0004639] (Classic Version)
 
***[http://legacy.wormbase.org/db/misc/etree?name=WBInteraction0004639;class=Interaction WBInteraction0004639] (Tree Display)
 
***Restructured table to combine effector, effected, & non-directional into one "Interactors" column
 
****[http://dev.wormbase.org:8023/species/c_elegans/interaction/WBInteraction0500325 WBInteraction0500325]
 
**Microarray_results
 
***Only displayed one gene and one cds (both incorrectly due to tags being arrays but passed to pack_obj as single object)
 
****Changed to handle as array and use tags2link macro in template
 
***Added transcript and pseudogene fields
 
***Added "Experiments" widget containing associated experiments, range, and microarray details
 
***[http://dev.wormbase.org:8023/species/c_elegans/microarray_results/Aff_Y105C5.DD Aff_Y105C5.DD] (Dev Version)
 
**Molecule
 
***Corrected affected... fields to display data and formatted into tables
 
***Created Phenotypes Affected widget and moved relevant fields
 
***[http://dev.wormbase.org:8023/species/c_elegans/molecule/C027492 C027492] (Dev Version)
 
**Operon
 
***Added Structure widget to display gene information
 
***Added Location widget with Gene Models and Operon tracks
 
***[http://dev.wormbase.org:8023/species/c_elegans/operon/CEOP2606 CEOP2606] (Dev Version)
 
**Oligo
 
***Added In Sequences and PCR products fields to overview
 
**Strain
 
***Corrected issue with linking genotype
 
**Structure_data
 
***Added overview template and corrected corresponding fields in API
 
***Added external links widget
 
**Standardization and optimization
 
***Combined and cleaned-up API methods for "Gene page->Phenotypes widget->Evidence column of tables"
 
 
====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: [http://dev.wormbase.org:8023/species/c_elegans/gene/WBGene00012348#8--10 pptr-1]
 
*'''Progress:'''
 
**Checking cytoscapeweb documentation for how to incorporate this
 
*'''Related/Example Links:'''
 
**[http://dev.wormbase.org:8023/species/c_elegans/gene/WBGene00006763#8--10 unc-26](<del>82 with duplication</del> 71 unique interactions)
 
**[http://dev.wormbase.org:8023/species/c_elegans/gene/WBGene00000912#8--10 daf-16](<del>433 with duplication</del> 181 unique interactions)
 
**[http://dev.wormbase.org:8023/species/c_elegans/gene/WBGene00000898#8--10 daf-2](600 interactions without neighbours displayed)
 
*'''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 <del>400</del> 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:'''
 
**Interactions info needs to be loaded from a separate database to speed up
 
*'''Related/Example Links:'''
 
**[http://dev.wormbase.org:8023/species/c_elegans/gene/WBGene00006763#8--10 unc-26 Interactions Widget]
 
**[http://dev.wormbase.org:8023/species/c_elegans/gene/WBGene00006763#a--10 unc-26 Phenotypes Widget]
 
**[http://dev.wormbase.org:8023/species/c_elegans/gene/WBGene00006763#b--10 unc-26 Reagents Widget]
 
**[http://dev.wormbase.org:8023/species/c_elegans/gene/WBGene00006763#6--10 unc-26 Homology Widget]
 
**[http://dev.wormbase.org:8023/species/c_elegans/gene/WBGene00006763#68ab--10 unc-26 All 4 Widgets]
 
*'''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
 
**Changing evidence in Phenotypes widget to be consistent
 
***Format: "name/id(paper)" with evidence drop-down when clicked for all types - Alleles, Transgenes,& RNAi(extract info)
 
 
====Sequence/Transcript/CDS page alterations====
 
*'''Details:'''
 
**Making corrections to Sequence, CDS, & Transcript pages based on curator consultation
 
**CDS
 
***Sequences Widget
 
****Show marked-up sequences for corresponding transcripts
 
**All
 
***Overview Widget
 
****Download dialog launched from highlight box: fix scrollbar and rapid-click issues
 
***Location Widget
 
****Highlight current on track or at least show gene names
 
*'''Progress:'''
 
**Split CDS and Transcript, now checking that methods do not attempt to access invalid fields
 
*'''Related/Example Links:'''
 
*[http://dev.wormbase.org:8023/species/c_elegans/cds/JC8.10c#01234--10 JC8.10c] (CDS)
 
*[http://dev.wormbase.org:8023/species/c_elegans/transcript/JC8.10c.1#01234--10 JC8.10c.1] (Transcript)
 
*[http://dev.wormbase.org:8023/species/c_elegans/sequence/yk444b8.5#01234--10 yk444b8.5] (Sequence)
 
*[http://dev.wormbase.org:8023/species/c_elegans/sequence/2RSSE#01234--10 2RSSE] (Sequence w/ Method)
 
*'''Completed:'''
 
**Consultation from curators. Teleconference: 11:30 am EST Wednesday, January 25th, 2012
 
**Separating Transcript(+CDS) and Sequence pages
 
***Separating CDS from Transcript
 
***Checking Sequence page methods to ensure that only valid fields are accessed
 
****Comparing with schema
 
****Removing eval statements
 
**Region Widget
 
***Redistribute data and remove widget
 
****Matching cDNAs moved to Reagents widget
 
****Moved "Transcripts in this region" field to Sequences widget
 
**Origin Widget
 
***Moved to Overview
 
***Changed to a curator-only field using curator_block macro
 
**Reagents Widget
 
***Add PCR products
 
****Tags/info should already be in the model
 
**Sequences Widget
 
***Predicted Exon Structure table
 
****Removed completely (Although tag exists in schema, it has not been populated for any Sequences, only Transcripts)
 
****<del>Calculate and show exon & intron sizes using "Relative to Itself"</del>
 
****<del>Remove "Relative to Superlink"</del>
 
*****<del>Start & End "Relative to Itself" are useful in some cases (keep)</del>
 
**Sequences
 
***Sequences Widget
 
****Show orthologs? (for navigation to related info, especially useful for curators)
 
*****Syntenic sequences
 
****Show corresponding gene in predicted genes and transcriptional units (e.g. unc-26 for yk444b8.5)
 
**Transcript
 
***Split into CDS and Transcript
 
***Location Widget
 
****Show protein domains for CDS
 
**All
 
***Overview Widget
 
****Make origin info available to users (not just curators)
 
****Show remarks/description associated with Method to make it more meaningful
 
*****e.g. Method for AAA27985.1 is ndb_cds which is not particularly meaningful
 
****Show affiliated gene(e.g. unc-26 for yk444b8.5)
 
*****Add navigation table (similar to table in sequences widget on gene page, e.g. Matching transcripts/CDS)
 
***Location Widget
 
****Hide YAC's, fosmids, & cosmids track
 
 
====Variation page alterations====
 
*'''Details:'''
 
**Making corrections to Variation page interface based on curator consultation
 
**Change default widgets (Overview, Genetics, Molecular Details, Phenotypes)
 
**Overview Widget
 
***Hide Status field if Live (show otherwise e.g. suppressed/dead)
 
***Remove redundant remarks
 
**Molecular Details Widget
 
***Check that the sequence is actually on the + strand?
 
***"Flanking Sequences" and "Context" should be removed
 
****Just show marked-up sequence by default (toggle if too large)
 
****Add colour legend (yellow=flanking, red=deletion/substitution/...)
 
***Features Affected field -> Predicted CDSs
 
****Add "Variation" to "Contained in:" to clarify
 
****Change Predicted CDSs and Clone to data tables
 
**Location Widget
 
***Remove contig submission track
 
**Phenotypes
 
***Remove remarks and add evidence/citations
 
***Remove phenotype description or hide by default
 
*'''Progress:'''
 
*'''Related/Example Links:'''
 
**[http://dev.wormbase.org:8023/species/c_elegans/variation/WBVar00143133#01234567--10 e345](Allele:deletion)
 
**[http://dev.wormbase.org:8023/species/c_elegans/variation/WBVar00278010#01234567--10 ok5175](Allele:substitution)
 
*'''Completed:'''
 
**Completed by Abby
 
**Consultation from curators. Teleconference: 11:30 am EST Wednesday, February 1st, 2012
 
 
====Curator Requests====
 
*'''Details:'''
 
**Protein Page ([mailto:cgrove@caltech.edu Christian A Grove])
 
***[http://dev.wormbase.org:8023/species/c_elegans/protein/WP:CE28239#01234--10 UNC-26] (Sample Protein Page)
 
**#Overview widget: in the right-hand box, the "Status: history" is not clear. What does this mean? Do we need/want to display this?
 
**#External Links widget: "TREEFAM" links back to the same UNC-26 protein page, as does "WORMPEP". "WP:CE28239" links to the old UNC-26 protein page; is this what we want? Also, both UniProt links are dead/obsolete/outdated
 
**#We should add units to Molecular Weight wherever it is mentioned (as I said in the gene page review). The units should either be "kilodaltons" or "kD"
 
**#History widget: The "JC8.10" under "Predicted gene" links to a WormBase search result for "JC8.10". I think it would be better to direct users to the exact (unc-26) page, rather than having them have to select among many options.
 
**#The red text in the protein schematic for domain names is a bit hard on the eyes. Could we go with a more neutral color: black, grey, blue...?
 
**#Can we include descriptions of the domains depicted in the domain cartoons, or at least provide a link out to the relevant InterPro or PFAM pages?
 
**Gene Page ([mailto:cgrove@caltech.edu Christian A Grove])
 
***[http://dev.wormbase.org:8023/species/c_elegans/gene/WBGene00000846#09e--10 cup-5] (Sample Gene Page)
 
***Postponed:
 
****Human Diseases widget:
 
*****The description for the disease is cutoff: "...along the lysosomal pathway, affecting membra" ; is this intentional? Could we maybe add a "..." to the end?
 
****Phenotype widget
 
****Cross-platform issues (Chrome & Safari vs Firefox)
 
*****The table display for "Primary Sequence ID" in the Sequences widget is a little wonky on Firefox. As you can see from the screenshots (attached) as I resize the table in Firefox, that column adjusts strangely, skewing the text, whereas in Safari and Chrome, the table stays nice and neat.
 
******[[Media:Firefox_Table_1.png]]
 
******[[Media:Firefox_Table_2.png]]
 
******[[Media:Firefox_Table_3.png]]
 
******[[Media:Safari_Chrome_Table.png]]
 
***There are a number of unnecessary hyperlinks in the phenotype description details. For example, all remarks, the word "Genotype" after "Phenotype assay:", and the phrase "Uncharacterised_loss_of_function" after "Loss of function:" are all hyperlinked to what appears to be a general WormBase text search result. These should just be plain text.
 
***One general comment is that I think I would prefer that links out to other pages open a new tab by default, but I may be in the minority with that opinion (or that may have been your intention, but Firefox is not cooperating)
 
*'''Progress:'''
 
**Investigating hyperlinks in phenotype description details
 
*'''Related/Example Links:'''
 
*'''Completed:'''
 
**Gene Page
 
***External links widget:
 
****The OMIM link out appears to be malformed. The URL that the link directs me too is:
 
*****http://omim.org/enrty/OMIM:605248 (verbatim, entry is mispelled)
 
****whereas this is a working link:
 
*****http://omim.org/entry/605248
 
****(as I write this I realize that someone from OMIM just e-mailed to point this out)
 
****Queried ACeDB Database class for databases with URL, URL_Constructor, and Description and added those to the external_urls template
 
*****Need to verify that all links are working and add other links(i.e. databases that didn't match the query)
 
*****Added/updated descriptions (some from ACeDB, some from website's homepage)
 
***Homology widget:
 
****When I click on the download option for homologous proteins, a window pops up to show Sequence, Isoelectric Point, Molecular Weight, etc. I know this is more a Protein issue, but we should put units for Molecular Weight (e.g. "77.7 kiloDaltons" or "kD" as opposed to just "77.7")
 
***Genetics widget:
 
****In both the "Alleles" and the "Polymorphisms & Natural Variants" tables, the right-most column is "Protein effect" and "Location", respectively. Under "Protein effect" is displayed "nonsense" and "missense" (which are OK), but also "intron", which does not make sense. Under "Location" is displayed "intron" and "utr_3" (OK), but also "missense" and "silent" (not OK). I would suggest having a "Protein effect" and a "Location" column in each table and putting only relevant entries in each:
 
*****Protein effect: nonsense, missense, silent, etc.
 
*****Location: intron, exon, utr_3, utr_5, etc.
 
***Interactions widget:
 
****The different color nodes and thickness of lines are not explained in the legend. Can we add an explanation somewhere?
 
****In the "Citations" column is listed all of the WormBase Interaction objects affiliated with this interaction. I would expect to see paper references in a "Citations" column. Could we perhaps put the interactions under a "Interactions" column all the way to the left, and keep the "Citations" column at the right with WBPaper references?
 
****The Cytoscape network view looks great, but the window for viewing it is too short (vertically) in Firefox, and too tall in Safari and Chrome. Could we find an intermediate height or provide options to resize?
 
 
====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
 
*Loading/processing large amounts of data
 
**Details:
 
***Likely approach will be to change the database used from ACeDB to NoSQL/CouchDB
 
***[http://beta.wormbase.org/resources/laboratory/VC#1--10 Sample Issue]
 
**Progress:
 
***[https://github.com/aduong/ace2couch Ace2Couch Scripts] for migrating data
 
***[https://github.com/aduong/AceCouch AceCouch Perl API]
 
 
 
==Getting Started==
 
==Getting Started==
 
See [[WormBase Staff Resources]].
 
See [[WormBase Staff Resources]].
  
===Members/Contacts===
+
===WormBase WebDev Team Members/Contacts===
*Abigail Cabunoc - [mailto:abigail.cabunoc@oicr.on.ca abigail.cabunoc@oicr.on.ca]
+
*Lincoln Stein - [mailto:lincoln.stein@gmail.com lincoln.stein@gmail.com]
 
*Todd Harris - [mailto:todd@wormbase.org todd@wormbase.org]
 
*Todd Harris - [mailto:todd@wormbase.org todd@wormbase.org]
*Lincoln Stein - [mailto:lincoln.stein@gmail.com lincoln.stein@gmail.com]
+
*Sibyl Gao - [mailto:sibyl@wormbase.org sibyl@wormbase.org]
*Quang Trinh
+
*Scott Cain - [mailto:scott@scottcain.net scott@scottcain.net]
  
 
===Meetings===
 
===Meetings===
*WormBase OICR Developers Teleconference
 
**Mondays, 3:00PM
 
**Phone-in 1-800-747-5150 id: 6738514
 
 
*WormBase OICR Developers Teleconference with Lincoln
 
*WormBase OICR Developers Teleconference with Lincoln
**Wednesdays, 4:00PM EST
+
**First Friday of the Month, 11:00AM
**Lincoln's office
+
**Phone-in 1-800-747-5150
**[http://wiki.wormbase.org/index.php/Conference_call_agendas_and_minutes Agenda and Minutes]
+
***Access Code: 6738514
 +
**OR: Lincoln's office
 
*WormBase International Group (HelpDesk) Teleconference
 
*WormBase International Group (HelpDesk) Teleconference
**Every other Thursday, 11:30AM
+
**First Thursday of the Month, 11:30AM
**Lincoln's Office
+
**1-866-528-2256
**Alternatively: 1-866-528-2256
 
 
***Access Code: 714646
 
***Access Code: 714646
**[[Conference calls]]
+
**[[Help_desk_schedule|HelpDesk Schedule and Agendas]]
*Group Meeting
+
**[[Conference calls|Past Agendas and Minutes]]
**Fridays, 3:00PM
+
*Stein Lab, Group Meeting
 +
**Fridays, 2:00PM
 
**HL31 Conference Room/TBA
 
**HL31 Conference Room/TBA
 +
* Web Development Issues Meeting
 +
** Tuesday 10:00am
 +
** [[WebDev_Issues_Meetings]]
  
 
==Tools/Resources==
 
==Tools/Resources==
Line 471: Line 40:
  
 
===Git===
 
===Git===
 +
====Intro to Git====
 +
Tutorial: [http://try.github.io try.github.io]
 +
 
Git is a version control system used for collaboration and backup in the development process. One starting point is the [http://progit.org/book/ch1-3.html progit tutorial]
 
Git is a version control system used for collaboration and backup in the development process. One starting point is the [http://progit.org/book/ch1-3.html progit tutorial]
 
*WormBase repository located at https://github.com/organizations/WormBase
 
*WormBase repository located at https://github.com/organizations/WormBase
Line 482: Line 54:
 
  git '''add''' a.txt
 
  git '''add''' a.txt
 
  git '''commit''' -m “Added ''change1'' and ''change2'' to a.txt”
 
  git '''commit''' -m “Added ''change1'' and ''change2'' to a.txt”
 +
git '''pull'''
 
  git '''push'''
 
  git '''push'''
 
</code>
 
</code>
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:
+
Notes:
<code>
+
* pull is similar to using 'git fetch' + 'git merge'. However, performing them separately allows you to review the changes coming in before merging.
  git '''fetch'''
+
* the -m flag allows the user to input the message inline. Exlcuding it will result in an editor being opened for message entry
  git '''merge'''
+
 
  git '''push'''
+
====Setting-Up Repository====
</code>
+
*If you do not already have an account on GitHub, sign up
Note: pull is similar to using fetch + merge
+
*Send a request to [mailto:todd@wormbase.org Todd] to grant you access to both the dev.wormbase.org machine and the WormBase repositories
 +
*Connect via ssh to dev.wormbase.org
 +
*Follow the GitHub instructions for [http://help.github.com/linux-set-up-git/ Set Up Git] to configure SSH keys
 +
**Skip step 1, git should already be installed
 +
*To check-out the repository:
 +
  $ cd /usr/local/wormbase/website
 +
  $ git clone git@github.com:WormBase/website.git
 +
  $ mv website [your username]
 +
*See [[Administration:Installing_WormBase]] for more details
  
 
===Browser (Debugging)===
 
===Browser (Debugging)===
Line 499: Line 80:
 
*Firefox->Web Developer->Web Console/Error Console
 
*Firefox->Web Developer->Web Console/Error Console
  
===Other===
+
===ACeDB===
Some other tools that you should be aware of but may not be required to know/interact with include:
 
*JavaScript
 
 
*ACeDB
 
*ACeDB
 
**Usage:
 
**Usage:
 
***Navigate to /usr/local/wormbase/acedb/bin and run: "./tace ../wormbase"
 
***Navigate to /usr/local/wormbase/acedb/bin and run: "./tace ../wormbase"
 
***For more help, try the [http://www.acedb.org/Cornell/tace.html tace tutorial]
 
***For more help, try the [http://www.acedb.org/Cornell/tace.html tace tutorial]
 +
**Troubleshooting:
 +
***To restart the server on dev: '''Must be super user'''
 +
/etc/init.d/xinetd stop
 +
ps aux | grep sgiface
 +
!!If sgifaceserver is still running use 'kill #####' (where ##### is the process id)
 +
/etc/init.d/xinetd start
 +
 +
===CouchDB===
 +
**Troubleshooting:
 +
***To restart the server on dev:
 +
  sudo /etc/init.d/couchdb restart
 +
 +
===MySQL===
 +
**Troubleshooting:
 +
***To restart the server on dev:
 +
  sudo /etc/init.d/mysql restart
 +
 +
===Template Toolkit===
 +
*[http://template-toolkit.org/docs/index.html Template Toolkit Documentation]
 +
*Common useful macros for templates can be found in:
 +
**/root/templates/config/main
 +
***e.g. tags2link
 +
**/root/templates/shared/page_elements.tt2
 +
***e.g. cell_content, build_data_table
 +
***cell_content is mainly used for build_data_table to format the information to be displayed
 +
****makes use of other macros for displaying special data such as links(MACRO tags2link) and evidence boxes(MACRO evidence)
 +
****runs into errors when an ACe object is passed. Corrections should be made in the API to prevent ACe objects being returned to interface
 +
****Can be used to display many types of data (not restricted for use in build_data_table)
 +
****determines type of the content through a series of checks
 +
*****If the passed reference is an array, it performs recursion on each element
 +
*****If hash, outputs the key followed by the formatted content
 +
*****To add new case, check for a uniquely identifying property of the data and then perform the desired action (e.g. run a corresponding MACRO on the data)
 +
# e.g. Evidence data is always stored in a hash with a 'text' key and an 'evidence' key
 +
# Therefore cell_content checks whether the evidence key is defined in the data to be outputted
 +
# If it is, the evidence() macro is run with the data.
 +
[% MACRO cell_content(cell) BLOCK;
 +
      ...
 +
      ELSIF cell.evidence.defined;
 +
        evidence(cell.evidence,table_name _ index, cell.text, 'details');
 +
      ...
 +
END; %]
 +
 +
===Other===
 +
Some other tools that you should be aware of but may not be required to know/use include:
 +
*JavaScript
 
*MySQL
 
*MySQL
 
*Xapian
 
*Xapian
Line 518: Line 142:
 
===Starting the server===
 
===Starting the server===
 
*In a terminal, connect to wb-dev (via ssh) and navigate to the root of your dev site (where you checked-out the git repository e.g. /usr/local/wormbase/website/[user]/)
 
*In a terminal, connect to wb-dev (via ssh) and navigate to the root of your dev site (where you checked-out the git repository e.g. /usr/local/wormbase/website/[user]/)
*Run the startup script: "./script/wormbase_server.pl -p XXXX" where XXXX is a port number
+
*Run the startup script: "./script/wormbase_server.pl -p ####" where #### is a port number
 
**Typical options are -d for debugging and -r to auto-restart when changes to the code are detected
 
**Typical options are -d for debugging and -r to auto-restart when changes to the code are detected
 
**Output can be redirected into a log file ">>logs/server_log.log 2>&1" (redirects both output and errors into server_log.log)
 
**Output can be redirected into a log file ">>logs/server_log.log 2>&1" (redirects both output and errors into server_log.log)
Line 528: Line 152:
 
* Chrome provides a very useful set of tools for debugging that can be accessed by either 'Inspect Element' in the context(right-click) menu, or from Menu->Tools->Developer Tools (Shift+Ctrl+i)
 
* Chrome provides a very useful set of tools for debugging that can be accessed by either 'Inspect Element' in the context(right-click) menu, or from Menu->Tools->Developer Tools (Shift+Ctrl+i)
 
* Firefox has a "firebug" plugin that provides similar functionality
 
* Firefox has a "firebug" plugin that provides similar functionality
*The tools can be used to monitor numerous aspects
+
*The tools can be used to monitor different aspects of the page
 
**Network information such as GET/POST requests and their corresponding info (e.g. url and parameters)
 
**Network information such as GET/POST requests and their corresponding info (e.g. url and parameters)
 
**Underlying HTML and scripts for the page
 
**Underlying HTML and scripts for the page
 +
 
===Widget Data Loading===
 
===Widget Data Loading===
 
[[File:DataLoadingWidget1.png|200px|thumb|Widget Loading]]
 
[[File:DataLoadingWidget1.png|200px|thumb|Widget Loading]]
Line 544: Line 169:
 
#Request information such as the url and parameters are passed from the browser to the server
 
#Request information such as the url and parameters are passed from the browser to the server
 
#Tools controller in server processes requests to /tools/... and calls corresponding API method
 
#Tools controller in server processes requests to /tools/... and calls corresponding API method
##Determines tool and action from url (e.g. /tools/tree/run... => tool=tree, action=run)
+
#*Determines tool and action from url (e.g. /tools/tree/run... => tool=tree, action=run)
##* Note: schema and gmap tools have similar function to other tools, tree and epic respectively
+
#** Note: schema and gmap tools have similar function to other tools, tree and epic respectively
##* Any calls to these are translated to calls to the corresponding tool (e.g. schema->tree or gmap->epic)
+
#** Any calls to these are translated to calls to the corresponding tool (e.g. schema->tree or gmap->epic)
##Processes special parameters such as inline (for embedding in widget)
+
#*Processes special parameters such as inline (for embedding in widget)
##Calls the API method corresponding to the action (e.g. "run" in tree.pm)
+
#*Calls the API method corresponding to the action (e.g. "run" in tree.pm)
 
#API method processes information passed from Controller and returns processed/packaged info to Tools Controller
 
#API method processes information passed from Controller and returns processed/packaged info to Tools Controller
##Loads data passed from Controller(e.g. "my $name = $params->{'name'};" loads the name)
+
#*Loads data passed from Controller(e.g. "my $name = $params->{'name'};" loads the name)
##Loads appropriate data from databases (e.g. ACe object corresponding to the given 'name' & 'class' params)
+
#*Loads appropriate data from databases (e.g. ACe object corresponding to the given 'name' & 'class' params)
##Performs subsequent processing on data (e.g. blast tool runs blast with the given params)
+
#*Performs subsequent processing on data (e.g. blast tool runs blast with the given params)
##Formats/packages data (e.g. commonly used method is _pack_obj which stores appropriate info for creating links for the interface)
+
#*Formats/packages data (e.g. commonly used method is _pack_obj which stores appropriate info for creating links for the interface)
##* Note: it is important to not return raw data (primarily ACe objects) to the interface. Two possible fixes are _pack_obj($object) or "$object" (stringify)
+
#** Note: it is important to not return raw data (primarily ACe objects) to the interface. Two possible fixes are _pack_obj($object) or "$object" (stringify)
##* Note: it is also important to return "undef" instead of null or empty arrays/hashes
+
#** Note: it is also important to return "undef" instead of null or empty arrays/hashes
 
#Tools Controller passes API results to View (Template)
 
#Tools Controller passes API results to View (Template)
 
#View (Template) arranges/outputs the data for display
 
#View (Template) arranges/outputs the data for display
##Uses various methods/macros
+
#*Uses various methods/macros
###tag2link to convert a hash generated using _pack_obj into a link
+
#**tag2link to convert a hash generated using _pack_obj into a link
###build_data_table to generate a formatted data table
+
#**build_data_table to generate a formatted data table
##* Note: common/useful macros can be found in /root/templates/config/main and /root/templates/shared/page_elements.tt2
+
#** Note: common/useful macros can be found in /root/templates/config/main and /root/templates/shared/page_elements.tt2
 +
 
 +
==Guides==
 +
* [[Adding Data to a Widget (Example)]]
 +
* [[Creating a widget]]
 +
* [[Creating a tool]]
  
 
==Other Info==
 
==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:
 
Useful files for debugging include:
*/logs/wb-dev-catalyst.log
+
*/logs/wormbase-catalyst-access.log
 
Other:
 
Other:
 
*If the port you have been using appears to be busy but the server is not running,
 
*If the port you have been using appears to be busy but the server is not running,
  ps -aux|grep -XXXX
+
  ps -aux|grep -####
 
  kill -9 ID
 
  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)
+
where #### 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
 
*To dump data in API methods include Data::Dumper
 
  use Data::Dumper
 
  use Data::Dumper
Line 582: Line 206:
 
  warn(Dumper(\@data));
 
  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
 
*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
+
  ssh -L 8080:localhost:#### wb-dev.oicr.on.ca
  ./wormbase_server.pl -p XXXX -d -r
+
(where '####' is the port that you have been assigned by Todd).
Then go to localhost:8080 in browser<br />
+
You will be prompted to login.  Then cd to /usr/local/wormbase/website/your_name/
 +
and type this command as usual:
 +
  ./wormbase_server.pl -p #### -d -r
 +
where #### is your desired port number. Then point your browser at localhost:8080 <br />
 +
 
 +
==Current Tasks==
 +
 
 +
Additional tasks that require further investigation
 +
*Loading/processing large amounts of data
 +
**Details:
 +
***Likely approach will be to change the database used from ACeDB to NoSQL/CouchDB
 +
***[http://beta.wormbase.org/resources/laboratory/VC#1--10 Sample Issue]
 +
**Progress:
 +
***[https://github.com/aduong/ace2couch Ace2Couch Scripts] for migrating data
 +
***[https://github.com/aduong/AceCouch AceCouch Perl API]
 +
 
 +
[[Category: Getting Started (Web Dev)]]

Latest revision as of 14:31, 17 May 2016

Getting Started

See WormBase Staff Resources.

WormBase WebDev Team Members/Contacts

Meetings

  • WormBase OICR Developers Teleconference with Lincoln
    • First Friday of the Month, 11:00AM
    • Phone-in 1-800-747-5150
      • Access Code: 6738514
    • OR: Lincoln's office
  • WormBase International Group (HelpDesk) Teleconference
  • Stein Lab, Group Meeting
    • Fridays, 2:00PM
    • HL31 Conference Room/TBA
  • Web Development Issues Meeting

Tools/Resources

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 For information regarding the use of ACeDB in conjuction with Perl (e.g. retrieving data), check AcePerl Documentation. The Ace::Object section contains most of the information related to interacting with ACeDB objects.

Catalyst

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

Git

Intro to Git

Tutorial: try.github.io

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 pull
git push

Notes:

  • pull is similar to using 'git fetch' + 'git merge'. However, performing them separately allows you to review the changes coming in before merging.
  • the -m flag allows the user to input the message inline. Exlcuding it will result in an editor being opened for message entry

Setting-Up Repository

  • If you do not already have an account on GitHub, sign up
  • Send a request to Todd to grant you access to both the dev.wormbase.org machine and the WormBase repositories
  • Connect via ssh to dev.wormbase.org
  • Follow the GitHub instructions for Set Up Git to configure SSH keys
    • Skip step 1, git should already be installed
  • To check-out the repository:
$ cd /usr/local/wormbase/website
$ git clone git@github.com:WormBase/website.git
$ mv website [your username]

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

ACeDB

  • ACeDB
    • Usage:
      • Navigate to /usr/local/wormbase/acedb/bin and run: "./tace ../wormbase"
      • For more help, try the tace tutorial
    • Troubleshooting:
      • To restart the server on dev: Must be super user
/etc/init.d/xinetd stop
ps aux | grep sgiface
!!If sgifaceserver is still running use 'kill #####' (where ##### is the process id)
/etc/init.d/xinetd start

CouchDB

    • Troubleshooting:
      • To restart the server on dev:
 sudo /etc/init.d/couchdb restart

MySQL

    • Troubleshooting:
      • To restart the server on dev:
 sudo /etc/init.d/mysql restart

Template Toolkit

  • Template Toolkit Documentation
  • Common useful macros for templates can be found in:
    • /root/templates/config/main
      • e.g. tags2link
    • /root/templates/shared/page_elements.tt2
      • e.g. cell_content, build_data_table
      • cell_content is mainly used for build_data_table to format the information to be displayed
        • makes use of other macros for displaying special data such as links(MACRO tags2link) and evidence boxes(MACRO evidence)
        • runs into errors when an ACe object is passed. Corrections should be made in the API to prevent ACe objects being returned to interface
        • Can be used to display many types of data (not restricted for use in build_data_table)
        • determines type of the content through a series of checks
          • If the passed reference is an array, it performs recursion on each element
          • If hash, outputs the key followed by the formatted content
          • To add new case, check for a uniquely identifying property of the data and then perform the desired action (e.g. run a corresponding MACRO on the data)
# e.g. Evidence data is always stored in a hash with a 'text' key and an 'evidence' key
# Therefore cell_content checks whether the evidence key is defined in the data to be outputted
# If it is, the evidence() macro is run with the data.
[% MACRO cell_content(cell) BLOCK;
     ...
     ELSIF cell.evidence.defined;
       evidence(cell.evidence,table_name _ index, cell.text, 'details');
     ...
END; %]

Other

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

  • JavaScript
  • 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

Starting the server

  • In a terminal, connect to wb-dev (via ssh) and navigate to the root of your dev site (where you checked-out the git repository e.g. /usr/local/wormbase/website/[user]/)
  • Run the startup script: "./script/wormbase_server.pl -p ####" where #### is a port number
    • Typical options are -d for debugging and -r to auto-restart when changes to the code are detected
    • Output can be redirected into a log file ">>logs/server_log.log 2>&1" (redirects both output and errors into server_log.log)
    • Therefore a full command could be "./script/wormbase_server.pl -d -r -p 8023 >>logs/server_log.log 2>&1"
    • Logs can be monitored in real-time by running "tail -f logs/server_log.log" or "tail -f logs/wb-dev-catalyst.log" in a separate terminal
  • Check OICR Tutorials and Workshops for useful Unix commands (OICR login required)

Debugging Tools

  • Chrome provides a very useful set of tools for debugging that can be accessed by either 'Inspect Element' in the context(right-click) menu, or from Menu->Tools->Developer Tools (Shift+Ctrl+i)
  • Firefox has a "firebug" plugin that provides similar functionality
  • The tools can be used to monitor different aspects of the page
    • Network information such as GET/POST requests and their corresponding info (e.g. url and parameters)
    • Underlying HTML and scripts for the page

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)

Tool Data Loading

Tool Loading

Typical flow of information:

  1. Request information such as the url and parameters are passed from the browser to the server
  2. Tools controller in server processes requests to /tools/... and calls corresponding API method
    • Determines tool and action from url (e.g. /tools/tree/run... => tool=tree, action=run)
      • Note: schema and gmap tools have similar function to other tools, tree and epic respectively
      • Any calls to these are translated to calls to the corresponding tool (e.g. schema->tree or gmap->epic)
    • Processes special parameters such as inline (for embedding in widget)
    • Calls the API method corresponding to the action (e.g. "run" in tree.pm)
  3. API method processes information passed from Controller and returns processed/packaged info to Tools Controller
    • Loads data passed from Controller(e.g. "my $name = $params->{'name'};" loads the name)
    • Loads appropriate data from databases (e.g. ACe object corresponding to the given 'name' & 'class' params)
    • Performs subsequent processing on data (e.g. blast tool runs blast with the given params)
    • Formats/packages data (e.g. commonly used method is _pack_obj which stores appropriate info for creating links for the interface)
      • Note: it is important to not return raw data (primarily ACe objects) to the interface. Two possible fixes are _pack_obj($object) or "$object" (stringify)
      • Note: it is also important to return "undef" instead of null or empty arrays/hashes
  4. Tools Controller passes API results to View (Template)
  5. View (Template) arranges/outputs the data for display
    • Uses various methods/macros
      • tag2link to convert a hash generated using _pack_obj into a link
      • build_data_table to generate a formatted data table
      • Note: common/useful macros can be found in /root/templates/config/main and /root/templates/shared/page_elements.tt2

Guides

Other Info

Useful files for debugging include:

  • /logs/wormbase-catalyst-access.log

Other:

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

where #### is the port number(e.g. 8023) and ID is the process id that is using the port(e.g. 10361)

  • 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:#### wb-dev.oicr.on.ca
(where '####' is the port that you have been assigned by Todd).
You will be prompted to login.  Then cd to /usr/local/wormbase/website/your_name/ 
and type this command as usual:
./wormbase_server.pl -p #### -d -r
where #### is your desired port number. Then point your browser at localhost:8080 

Current Tasks

Additional tasks that require further investigation