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
1958d58e
Commit
1958d58e
authored
Feb 24, 2016
by
Daniel Teixeira
Browse files
adding total in dataset
parent
19b8cbc2
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/node-app/arraymap-beacon/v0.2/beacon-query.js
View file @
1958d58e
...
...
@@ -126,7 +126,6 @@ function checkResultAndGetResponse(params, samples, countTotal) {
if
(
samples
&&
samples
.
length
>
0
)
{
// a value was found by mongodb
responseResource
.
observed
=
samples
.
length
;
responseResource
.
NOT_BEACON_totalInDataSet
=
countTotal
;
var
matchedSegments
=
samples
.
map
(
function
(
s
)
{
return
checkResult
(
params
,
s
)});
if
(
!
matchedSegments
||
!
matchedSegments
[
0
]
||
!
matchedSegments
[
0
].
matchedSegment
)
{
...
...
app/node-app/routes/index.js
View file @
1958d58e
...
...
@@ -57,6 +57,7 @@ router.get('/v0.2/query/', function (req, res) {
req
.
db
.
samples
.
find
(
mongoQuery
,
{},
function
(
err
,
docs
){
var
response
=
beacon
.
checkResultAndGetResponse
(
req
.
query
,
docs
,
count
);
response
.
NOT_BEACON_totalInDataSet
=
count
;
res
.
json
(
response
);
});
}
...
...
Write
Preview
Supports
Markdown
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