Skip to end of banner
Go to start of banner

Details Page In depth Example

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

This page provides an in-depth explanation of the details page by using an example from the amp-ad knowledge portal.

Looking at this specific link, that page is driven off this row. Note the query was generated by adding a clause from the URL parameter Study=syn5550419 to the studies table - SELECT * FROM syn17083367 where Study = 'syn5550419'

To see the actual code which configures this page, see here.

Study Description

This section is driven by the Study column whose value is the ownerId of a wiki page

Access Requirements

This uses a wiki page thats hard coded across all the detail pages, so it has no corresponding column.

Methods

This is driven by the Methods column which is a comma delimited list of ownerIds corresponding to wiki pages which are then rendered out sequentially in that section

Study Metadata

This one is a bit mind bending.. the Study column is again being used, but this time the value is being resolved as an entity whose name is then being matched against the 'study' (note - the spelling of 'study' here is intentional) column in syn11346063 to drive the metadata table. It doesn't end there though, syn11346063, already has an existing sql query to subset to 'metadata' which the entity's name is being added too, see below.

The ingredients for this section of the specific page I linked above look like - 

  1. Grab value from Study column: syn5550419

  2. Resolve the value as a synId and grab entity name: rnaSeqSampleSwap

  3. Make a LIKE clause (could also be an equal's clause if desired) using the above value against the study column: study LIKE '%rnaSeqSampleSwap%'

  4. Add this clause to the existing metadata table for amp-ad which has the default query 

    "SELECT id, metadataType, dataType, assay FROM syn11346063 WHERE `dataSubtype` = 'metadata'"
  5. The end result then becomes

    "SELECT id, metadataType, dataType, assay FROM syn11346063 WHERE `dataSubtype` = 'metadata' AND `study` LIKE '%rnaSeqSampleSwap%'"

Study Data

This section works exactly as Study Metadata, except step 4 from above has a different sql being used to insert the clause into:

"SELECT `resourceType`,`dataType`, `assay`, COUNT(`id`) AS `Files` FROM syn11346063 WHERE  (`dataSubtype` <> 'metadata' OR `dataSubtype` IS NULL) GROUP BY 1, 2,3 ORDER BY 4 DESC"

The end result is 

"SELECT `resourceType`,`dataType`, `assay`, COUNT(`id`) AS `Files` FROM syn11346063 WHERE (`study` LIKE '%rnaSeqSampleSwap%') AND(`dataSubtype` <> 'metadata' OR `dataSubtype` IS NULL) GROUP BY 1, 2,3 ORDER BY 4 DESC"

Data Updates

Wiki page used across all detail pages, no corresponding column.

Related Studies

Driven by the Related_Studies column whose value is a comma delimited list of  synIds that have a corresponding row in https://www.synapse.org/#!Synapse:syn17083367/tables/ which then render into cards.

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.