Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ABSD
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hub
ABSD
Commits
24bbb245
Commit
24bbb245
authored
8 months ago
by
Simon Malesys
Browse files
Options
Downloads
Patches
Plain Diff
Remove old statistics filter
parent
f2725d73
No related branches found
No related tags found
1 merge request
!8
Merge modifications asked by reviewers
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/statisticsBuilder.js
+2
-9
2 additions, 9 deletions
scripts/statisticsBuilder.js
with
2 additions
and
9 deletions
scripts/statisticsBuilder.js
+
2
−
9
View file @
24bbb245
...
...
@@ -39,18 +39,11 @@ export default async function computeStats() {
const
db
=
mongoClient
.
db
(
config
.
ABSD_DB_NAME
)
const
coll
=
db
.
collection
(
'
antibodies
'
)
const
request
=
{
$and
:
[
{
"
heavyChain.headers.source
"
:
{
$nin
:
[
'
OAS
'
]}},
{
"
lightChain.headers.source
"
:
{
$nin
:
[
'
OAS
'
]}}
]
}
stats
.
antibodies
=
await
coll
.
countDocuments
(
request
)
stats
.
antibodies
=
await
coll
.
countDocuments
()
stats
.
species
=
(
await
coll
.
distinct
(
'
species
'
)).
length
stats
.
sources
=
(
await
coll
.
distinct
(
'
heavyChain.headers.source
'
)).
length
-
1
for
await
(
const
antibody
of
coll
.
find
(
request
))
{
for
await
(
const
antibody
of
coll
.
find
())
{
if
(
stats
.
antibodiesPerSpecies
[
antibody
.
species
])
stats
.
antibodiesPerSpecies
[
antibody
.
species
]
+=
1
else
stats
.
antibodiesPerSpecies
[
antibody
.
species
]
=
1
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment