Skip to content

Commit

Permalink
adding dock strings
Browse files Browse the repository at this point in the history
  • Loading branch information
mayabrandi committed Sep 30, 2020
1 parent b798fbb commit 4f8d547
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions NIPTool/server/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ def get_sample_for_samp_tris_plot(sample):


def get_last_batches(adapter, nr: int) -> list:
"""geting the <nr> last batches based on SequencingDate"""

batch_sort_aggregation = [{'$sort': {'SequencingDate': -1}}]
sorted_batches = list(adapter.batch_aggregate(batch_sort_aggregation))
if len(sorted_batches) > nr:
Expand All @@ -313,6 +315,8 @@ def get_last_batches(adapter, nr: int) -> list:


def get_statistics_for_scatter_plot(batches: list, fields: list)-> dict:
"""Formating data for scatter plot"""

scatter_plot_data = {}
for batch in batches:
batch_id = batch.get('_id')
Expand All @@ -325,6 +329,8 @@ def get_statistics_for_scatter_plot(batches: list, fields: list)-> dict:


def get_statistics_for_box_plot(adapter, batches: list, fields: list):
"""Getting and formating data for box plot"""

match = {'$match': {'SampleProject': {'$in': batches}}}
lookup = {'$lookup': {
'from': 'batch',
Expand Down

0 comments on commit 4f8d547

Please sign in to comment.