RESTful API for getting data and metadata

• All endpoints use HTTP GET unless otherwise noted.
• Use the domain   https://phenome.jax.org for all urls below.
• There are a number of live examples available below to try.
• Results are JSON by default. Specify csv=yes on any endpoint to get CSV.
• Errors are indicated by a non-200 http return code (400 = bad request; 404 = not found; 503 = service unavailable); see also the "error" element within the JSON result.

The MPD Terms of Use apply to all API usage, and we reserve the right to make additions, changes, or restrict API access at any time without notice. Those considering utilizing this API are encouraged to contact us at phenome@jax.org

Quick links:
• Getting info on projects, data sets
• Getting strain means (strain survey phenotypes)
• Getting metadata (strain survey phenotypes)



  Getting info on projects, data sets in MPD


/api/projects

Fetch a list of MPD projects / data sets. Each returned entry has some project attributes.
The following parameters can be supplied to filter the result (if none are specified then all projects are returned).
investigator ..... filter by pistring containing this, e.g. Gould TJ (case-insensitive)
projsym ..... retrieve a specific project by short name e.g. Gould2
projid ..... retrieve a specific project by integer ID eg. 471
mpdsector ..... filter by mpdsector term, e.g. pheno
largecollab ..... filter by largecollab term, e.g. HMDP
panelsym ..... filter by panelsym strain panel term, e.g. DO population
intervention ..... filter by intervention term, e.g. nicotine
Example 1: /api/projects   (all projects)
Example 1a: /api/projects?csv=yes   (all projects, in CSV format)
Example 2: /api/projects?investigator=Gould TJ
Example 2a: /api/projects?investigator=jackson lab
Example 3: /api/projects?largecollab=HMDP
Example 4: /api/projects?panelsym=DO population
Example 5: /api/projects?intervention=high-fat diet


/api/project_filters/filtername

This endpoint provides allowed filtering values for the /api/projects endpoint.
filtername is one of: mpdsector   largecollab   panelsym   intervention
Example 1: /api/project_filters/mpdsector
Example 2: /api/project_filters/panelsym
Example 3: /api/project_filters/largecollab
Example 4: /api/project_filters/intervention


/api/projects/projsym/strains

List the strains that were tested in the project projsym with some attributes for each.
Example 1: /api/projects/Gould2/strains
Example 2: /api/projects/UCLA1/strains


/api/investigators

Fetch a list of contributing investigators. The name parameter can be passed to filter on citation name eg. Smith JS (case insensitive).
Example 1: /api/investigators   (all)
Example 1a: /api/investigators?csv=yes   (all, in CSV format)
Example 2: /api/investigators?name=tarantino





  Getting individual animal data (strain survey phenotypes)


/api/pheno/animalvals/measnum

Fetch individual animal data for MPD strain survey phenotype measure(s) identified by measnum (an integer or comma-separated list of multiple integers).
Optional parameter: covariate .... the ID of another numeric measure involving the same animals

Example 1 (project Jaxpheno3, measureID 22826)   /api/pheno/animalvals/22826
Same as above but CSV result:   /api/pheno/animalvals/22826?csv=yes
Same as above but CSV for GxL:   /api/pheno/animalvals/45911?csv=yes&gxl_format1=yes
Example 2 (project Paigen1, measures 2908 and 2909)   /api/pheno/animalvals/2908,2909
Example 3 (measure 2909 with BW covariate 2905)   /api/pheno/animalvals/2909?covariate=2905
Example 4 (error example)   /api/pheno/animalvals/111
Example 5 (DO example)   /api/pheno/animalvals/47002


/api/pheno/animalvals/series/measnum

Fetch individual animal data for a series of measures identified by measnum.
Example 1, Ackert1 BMD at 6mo, 12mo, 20mo   /api/pheno/animalvals/series/25011
Same as above but CSV result:   /api/pheno/animalvals/series/25011?csv=yes
Example 2, Gould2 jumping behavior, nicotine vs. control   /api/pheno/animalvals/series/47115




  Getting strain means (strain survey phenotypes)


/api/pheno/lsmeans/selector

Get model-adjusted least-square strain means for one or more MPD phenotype measures in the "lsmeans" result element. For any requested measures that don't have adjusted means (usually because individual animal data were not submitted), the unadjusted strain means will be provided as a fallback, in the "unadj_means" result element. The selector parameter can be a measure ID, a comma-separated list of two or more measure IDs, or a valid project symbol such as Vinyard1. Note: for "lsmeans" the sex is one of f, m, or both; for "unadj_means" the sex is f or m (only).
Example 1:   /api/pheno/lsmeans/2908,2909
Example 2:   /api/pheno/lsmeans/Vinyard1
Example 3:   /api/pheno/lsmeans/2909,2208 (2909 has adjusted, 2208 doesn't)
Example 4:   /api/pheno/lsmeans/2909
Example 5:   /api/pheno/lsmeans/2208
Same as above but CSV result:   /api/pheno/lsmeans/2208?csv=yes


/api/pheno/strainmeans/selector

Get unadjusted strain means for one or more MPD phenotype measures. The selector parameter can be one measure ID, a comma-separated list of two or more measure IDs, or a valid project symbol such as Vinyard1. Unadjusted strain means should be available for every strain survey measurement in MPD even if data were supplied with no individual animal data available. In the json result the "sex" for each strain mean element will be either "f" or "m".
Example 1:   /api/pheno/strainmeans/2908,2909
Example 2:   /api/pheno/strainmeans/Vinyard1
Same as above but CSV result:   /api/pheno/strainmeans/Vinyard1?csv=yes




  Getting metadata (strain survey phenotypes)


/api/pheno/measureinfo/selector

Get descriptions, units, and other metadata for one or more MPD measures.
selector is either:
• a project symbol eg. Tarantino1 .... list info for all measures in the project ... or...
• one or more measureIDs (measnums) eg. 2928 .... list info for these specific measure(s) ...or....
all .... list info for all MPD measures
Example 1: List info for the measure having measure ID 2908:   /api/pheno/measureinfo/2908
Example 2: List info for the measures 2908 and 2909:   /api/pheno/measureinfo/2908,2909
Example 3: List info for all the measures in project Albers1:   /api/pheno/measureinfo/Albers1


/api/pheno/seriesinfo/selector

Get descriptions, units, and other metadata for one or more measure series. selector is either:
• a project symbol eg. Tarantino1 .... list info for all series in the project ... or...
• a seriestype eg. agingx .... list info for all series of this type ... or...
• a keymeasnum eg. 25011 .... list info for just this one series

Example 1. List info for the measure series that's identified by measure ID 25001:   /api/pheno/seriesinfo/25001
Example 2. List info for all measure series in project Ackert1:   /api/pheno/seriesinfo/Ackert1
Example 3. All measure series in MPD that are seriestype 'agingx':   /api/pheno/seriesinfo/agingx


/api/pheno/seriesmembers/keymeasnum

Get measure IDs, descriptions, and other metadata for all members of a measure series identified by keymeasnum. Returns one element per member.
  Some measure series have a supplemental measure that is closely associated with the series but cannot properly be included in series analysis. (Examples of this include slope, "index", delta, or other summary value). These are excluded by default; to include these specify the parameter include_supplemental as yes.
Example 1: /api/pheno/seriesmembers/25001
Example 2: /api/pheno/seriesmembers/16218
Example 3: /api/pheno/seriesmembers/16218?include_supplemental=yes


/api/pheno/measures_by_ontology/ont_term

The default use of this endpoint is to get measure IDs, descriptions, and other metadata for all measures that have been annotated to MP, VT, or MA ontology term ID ont_term or any of its DAG descendants. Payload includes additional info such as a list of all the involved ontology terms and descriptions. The following parameters are accepted:
this_term_only=yes .... work with the given term only, don't involve any DAG descendants
omit_baseline=yes .... omit measures that are 'baseline' or 'control' from the result; may be useful in eg. drug effect studies
collapse_series=yes .... any measure series will be represented as one pheno_measures row in the result
Example 1: /api/pheno/measures_by_ontology/VT:0010488
Example 2: /api/pheno/measures_by_ontology/VT:0010488?this_term_only=yes
Example 3: /api/pheno/measures_by_ontology/VT:0010488?omit_baseline=yes
Example 4: /api/pheno/measures_by_ontology/VT:0010488?collapse_series=yes
Example 5: /api/pheno/measures_by_ontology/VT:0010488?csv=yes
Example 6 (fail): /api/pheno/measures_by_ontology/VT:9898989
Example 7 (no measures mapped): /api/pheno/measures_by_ontology/MA:0000451