-
Notifications
You must be signed in to change notification settings - Fork 0
/
copo_samples_specimen_counts.js
48 lines (38 loc) · 2.07 KB
/
copo_samples_specimen_counts.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
DBQuery.prototype._prettyShell = true
conn = new Mongo("localhost:27017");
db = conn.getDB("admin")
db.auth('xxx','xxx');
db = db.getSiblingDB("copo_mongo") //db = conn.getDB("copo_mongo");
//x = db.SampleCollection.findOne({"biosampleAccession":"SAMEA14448781"}).pretty()y
x = db.Profiles.count({})
print("Number of Profiles: " + JSON.stringify(x))
x = db.SourceCollection.count({"sample_type":"dtol_specimen"})
print("DTOL Specimens: " + JSON.stringify(x))
x = db.SourceCollection.count({"sample_type":"asg_specimen"})
print("ASG Specimens: " + JSON.stringify(x))
x = db.SourceCollection.count({"sample_type":"erga_specimen"})
print("ERGA Specimens: " + JSON.stringify(x))
x = db.SampleCollection.count({"tol_project":"DTOL"})
print("DTOL Samples: " + JSON.stringify(x))
x = db.SampleCollection.count({"tol_project":"DTOL", "status":"accepted"})
print("Accepted DTOL Samples: " + JSON.stringify(x))
x = db.SampleCollection.count({"tol_project":"DTOL", "status":"pending"})
print("Pending DTOL Samples: " + JSON.stringify(x))
x = db.SampleCollection.count({"tol_project":"DTOL", "status":"rejected"})
print("Rejected DTOL Samples: " + JSON.stringify(x))
x = db.SampleCollection.count({"tol_project":"ASG"})
print("ASG Samples: " + JSON.stringify(x))
x = db.SampleCollection.count({"tol_project":"ASG", "status":"accepted"})
print("Accepted ASG Samples: " + JSON.stringify(x))
x = db.SampleCollection.count({"tol_project":"ASG", "status":"pending"})
print("Pending ASG Samples: " + JSON.stringify(x))
x = db.SampleCollection.count({"tol_project":"ASG", "status":"rejected"})
print("Rejected ASG Samples: " + JSON.stringify(x))
x = db.SampleCollection.count({"tol_project":"ERGA"})
print("ERGA Samples: " + JSON.stringify(x))
x = db.SampleCollection.count({"tol_project":"ERGA", "status":"accepted"})
print("Accepted ERGA Samples: " + JSON.stringify(x))
x = db.SampleCollection.count({"tol_project":"ERGA", "status":"pending"})
print("Pending ERGA Samples: " + JSON.stringify(x))
x = db.SampleCollection.count({"tol_project":"ERGA", "status":"rejected"})
print("Rejected ERGA Samples: " + JSON.stringify(x))