Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ST
ga4gh-arraymap
Commits
df1eee1b
Commit
df1eee1b
authored
Jan 13, 2017
by
Michael Baudis
Browse files
improving dataset listing
parent
dcfae313
Changes
3
Hide whitespace changes
Inline
Side-by-side
beacon-app/arraymap-beacon/v0.4/beacon-info.js
View file @
df1eee1b
// This is the list of all the datasets. Required in many places to check the
// dataset identifiers's validity for instance.
// Calling via localhost, since Beacon here always addresses the same host; safe for
// testing purposes (e.g. local usually via arraymap.test).
var
request
=
require
(
"
request
"
);
var
url
=
"
http://
arraymap.org
/qsubsets/?db=arraymap&collection=subsets&subsettype=ICDMORPHOLOGYCODE&querytext=8|9
"
;
var
url
=
"
http://
127.0.0.1
/qsubsets/?db=arraymap&collection=subsets&subsettype=ICDMORPHOLOGYCODE&querytext=
^
8|9
"
;
module
.
exports
=
{
getDatasetsFromArrayMap
:
function
(
callback
)
{
...
...
@@ -45,6 +47,8 @@ function getDatasets(json) {
var
datasets
=
[];
var
array
=
json
.
subsetdata
;
// TODO: sort array by SUBSETCODE (ATM done in the called CGI)
for
(
var
i
=
0
;
i
<
array
.
length
;
i
++
)
{
var
element
=
array
[
i
];
...
...
@@ -53,16 +57,19 @@ function getDatasets(json) {
// "UID":"80003","SUBSETCODE":"8000/3","SAMPLENO":7,"SUBSETTEXT":"8000/3: Neoplasm, malignant"
dataset
.
id
=
element
.
SUBSETCODE
;
dataset
.
description
=
element
.
SUBSETTEXT
;
dataset
.
description
=
element
.
SUBSETTEXT
+
"
(
"
+
element
.
SAMPLENO
+
"
)
"
;
dataset
.
reference
=
"
reference genome
"
;
var
size
=
{};
size
.
variants
=
"
-1
"
;
size
.
samples
=
element
.
SAMPLENO
;
dataset
.
size
=
size
;
if
(
size
.
samples
>
0
)
{
datasets
.
push
(
dataset
);
dataset
.
size
=
size
;
datasets
.
push
(
dataset
);
}
}
infoinfo
.
datasets
=
datasets
;
...
...
beacon-app/public/beacon-v03.json
View file @
df1eee1b
...
...
@@ -407,4 +407,4 @@
}
}
}
}
\ No newline at end of file
}
beacon-app/public/js/index.js
View file @
df1eee1b
...
...
@@ -22,7 +22,7 @@ arrayMap.factory('BeaconService', ['$http', '$q', function ($http, $q) {
function
getDatasets
()
{
var
defer
=
$q
.
defer
();
// var url = "http://arraymap.org/
api
/?db=arraymap&
api_out=icdmlist&api_out=icdmlist&api_doctype=json&icdm_m=8,
9";
// var url = "http://arraymap.org/
qsubsets
/?db=arraymap&
collection=subsets&subsettype=ICDMORPHOLOGYCODE&querytext=^8|
9";
var
url
=
"
/dataset?id=all
"
;
var
req
=
{
...
...
@@ -98,7 +98,7 @@ arrayMap.controller('BeaconController', ['$scope', '$location', 'BeaconService',
var
conf
=
$scope
.
config
;
return
$location
.
absUrl
()
+
"
v0.
2
/query?chromosome=
"
+
return
$location
.
absUrl
()
+
"
v0.
4
/query?chromosome=
"
+
conf
.
chromosome
+
"
&position=
"
+
conf
.
position
+
"
&reference=
"
+
conf
.
reference
+
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment