Skip to content

Commit

Permalink
Basic couchdb view on contamination screening
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Valls Guimera committed Oct 6, 2013
1 parent 4333f30 commit 5a3d1bf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/couchdb/contam_view.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function(doc) {
if (doc.sample && doc.contamination_rate) {
// only check organisms screened against ecoli for now
var bloom_file = doc.bloom_filter.replace(/^.*[\\\/]/, '')
var sample_file = doc.sample.replace(/^.*[\\\/]/, '')
if (bloom_file === 'eschColi_K12.bloom') {
emit([sample_file, bloom_file], doc.contamination_rate);
}
}
}

0 comments on commit 5a3d1bf

Please sign in to comment.