From 0e502113445741ecc6fcddde5d6b03b851146c02 Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 29 May 2019 12:35:37 -0500 Subject: Added info for fetching trait list --- doc/API_readme.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/API_readme.md b/doc/API_readme.md index 96e8b246..64fc61f9 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 CSV as default. There is also an optional "ids_only" parameter that will only return a list of trait IDs. + ## Fetch Trait Info (Name, Description, Location, etc) ## ### For mRNA Expression/"ProbeSet" ### ``` -- cgit v1.2.3 From 4241730a9e304ea272381456555d843d85f4cb04 Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 31 May 2019 12:55:28 -0500 Subject: Minor changes --- doc/API_readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/API_readme.md b/doc/API_readme.md index 64fc61f9..6c88d413 100644 --- a/doc/API_readme.md +++ b/doc/API_readme.md @@ -90,7 +90,7 @@ 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 CSV as default. There is also an optional "ids_only" parameter that will only return a list of trait IDs. +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" ### -- cgit v1.2.3