aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorzsloan2019-09-20 13:13:03 -0500
committerGitHub2019-09-20 13:13:03 -0500
commita708a0097e29509b209494e21a09f49d79467750 (patch)
tree3d8fe0530ee36ec65a72ed5196a6e0243c5c1c71 /doc
parentff67d4bb0e15339697e97c918df1f1cc4385dce6 (diff)
parent78d3086c3978525065d91c0e02f2c2e0583f8705 (diff)
downloadgenenetwork2-a708a0097e29509b209494e21a09f49d79467750.tar.gz
Merge branch 'testing' into 360_update_htmlgen
Diffstat (limited to 'doc')
-rw-r--r--doc/API_readme.md22
1 files changed, 15 insertions, 7 deletions
diff --git a/doc/API_readme.md b/doc/API_readme.md
index 96e8b246..6c88d413 100644
--- a/doc/API_readme.md
+++ b/doc/API_readme.md
@@ -51,13 +51,6 @@ curl http://gn2-zach.genenetwork.org/api/v_pre1/datasets/mouse/bxd
```
(I added the option to specify species just in case we end up with the same group name across multiple species at some point, though it's currently unnecessary)
-## Fetch Sample Data for Dataset ##
-```
-curl http://gn2-zach.genenetwork.org/api/v_pre1/sample_data/HSNIH-PalmerPublish.csv
-```
-
-Returns a CSV file with sample/strain names as the columns and trait IDs as rows
-
## Fetch Individual Dataset Info ##
### For mRNA Assay/"ProbeSet" ###
@@ -78,12 +71,27 @@ curl http://gn2-zach.genenetwork.org/api/v_pre1/dataset/bxd/10001
{ "dataset_type": "phenotype", "description": "Central nervous system, morphology: Cerebellum weight, whole, bilateral in adults of both sexes [mg]", "id": 10001, "name": "CBLWT2", "pubmed_id": 11438585, "title": "Genetic control of the mouse cerebellum: identification of quantitative trait loci modulating size and architecture", "year": "2001" }
```
+## Fetch Sample Data for Dataset ##
+```
+curl http://gn2-zach.genenetwork.org/api/v_pre1/sample_data/HSNIH-PalmerPublish.csv
+```
+
+Returns a CSV file with sample/strain names as the columns and trait IDs as rows
+
## Fetch Sample Data for Single Trait ##
```
curl http://gn2-zach.genenetwork.org/api/v_pre1/sample_data/HC_M2_0606_P/1436869_at
[ { "data_id": 23415463, "sample_name": "129S1/SvImJ", "sample_name_2": "129S1/SvImJ", "se": 0.123, "value": 8.201 }, { "data_id": 23415463, "sample_name": "A/J", "sample_name_2": "A/J", "se": 0.046, "value": 8.413 }, { "data_id": 23415463, "sample_name": "AKR/J", "sample_name_2": "AKR/J", "se": 0.134, "value": 8.856 }, ... ]
```
+## Fetch Trait List for Dataset ##
+```
+curl http://gn2-zach.genenetwork.org/api/v_pre1/traits/HXBBXHPublish.json
+[ { "Additive": 0.0499967532467532, "Id": 10001, "LRS": 16.2831307029479, "Locus": "rs106114574", "PhenotypeId": 1449, "PublicationId": 319, "Sequence": 1 }, ... ]
+```
+
+Both JSON and CSV formats can be specified, with JSON as default. There is also an optional "ids_only" and "names_only" parameter that will only return a list of trait IDs or names, respectively.
+
## Fetch Trait Info (Name, Description, Location, etc) ##
### For mRNA Expression/"ProbeSet" ###
```