Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Commit

Permalink
add flowcell sequence time to database view
Browse files Browse the repository at this point in the history
  • Loading branch information
risufaj committed Jan 14, 2019
1 parent 8a147dc commit eeda7af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions report/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
pooling.concentration_c1 AS "Concentration C1",
p.name AS "Pool",
concat(psize.multiplier, 'x', psize.size) AS "Pool Size",
/* Sample-specific fields */
{select}
Expand Down Expand Up @@ -126,15 +127,16 @@
LEFT JOIN pooling_pooling as pooling
ON record.id = pooling.{table_name}_id
/* Sample-specific joins */
{joins}
) t1
LEFT JOIN (
SELECT record.id AS t2_id,
array_to_string(array_agg(DISTINCT f.flowcell_id), ', ') AS "Flowcell ID",
SELECT record.id AS t2_id, f.create_time::date AS "Flowcell create time",
array_to_string(array_agg(DISTINCT s.name), ', ') AS "Sequencer"
FROM {table_name}_{table_name} AS record
LEFT JOIN index_generator_pool_{table_name_plural} as ps
Expand All @@ -149,6 +151,6 @@
ON fl.flowcell_id = f.id
LEFT JOIN flowcell_sequencer AS s
ON f.sequencer_id = s.id
GROUP BY record.id
GROUP BY record.id, f.create_time::date
) t2 ON t1_id = t2_id
'''
1 change: 1 addition & 0 deletions report/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ def database_data(request):
'Pool',
'Pool Size',
'Flowcell ID',
'Flowcell create time',
'Sequencer',
]

Expand Down

0 comments on commit eeda7af

Please sign in to comment.