Commit d7bd8fbe authored by Mikaël Salson's avatar Mikaël Salson Committed by Vidjil Team

server/.../{models,controllers}: Ignore hidden files

See previous commit for more information
parent 4ab2cfe2
Pipeline #80184 passed with stages
in 5 minutes and 42 seconds
......@@ -313,6 +313,7 @@ def get_data():
& ( db.sample_set.id == db.sample_set_membership.sample_set_id )
& ( db.sequence_file.id == db.sample_set_membership.sequence_file_id)
& ( db.results_file.sequence_file_id == db.sequence_file.id )
& ( db.results_file.hidden == False )
& ( db.results_file.config_id == request.vars["config"] )
).select(db.sequence_file.ALL,db.results_file.ALL, db.sample_set.id, orderby=db.sequence_file.id|~db.results_file.run_date)
......
......@@ -20,6 +20,7 @@ def index():
& (db.sequence_file.id==db.sample_set_membership.sequence_file_id)
& (db.sample_set_membership.sample_set_id==db.patient.sample_set_id)
& (db.results_file.config_id==db.config.id)
& (db.results_file.hidden == False)
).select(
orderby = ~db.results_file.run_date
)
......
......@@ -59,7 +59,8 @@ def info():
).select(
left=db.results_file.on(
(db.results_file.sequence_file_id==db.sequence_file.id)
& (db.results_file.config_id==str(config_id) )
& (db.results_file.config_id==str(config_id))
& (db.results_file.hidden == False)
),
orderby = db.sequence_file.id|~db.results_file.run_date
)
......@@ -79,6 +80,7 @@ def info():
left=db.results_file.on(
(db.results_file.sequence_file_id==db.sequence_file.id)
& (db.results_file.config_id==str(config_id) )
& (db.results_file.hidden == False)
)
)
......
......@@ -99,7 +99,8 @@ def index():
).select(
left=db.results_file.on(
(db.results_file.sequence_file_id==db.sequence_file.id)
& (db.results_file.config_id==str(config_id) )
& (db.results_file.config_id==str(config_id))
& (db.results_file.hidden == False)
),
orderby = db.sequence_file.id|~db.results_file.run_date
)
......@@ -118,7 +119,8 @@ def index():
).select(
left=db.results_file.on(
(db.results_file.sequence_file_id==db.sequence_file.id)
& (db.results_file.config_id==str(config_id) )
& (db.results_file.config_id==str(config_id))
& (db.results_file.hidden == False)
)
)
......@@ -304,6 +306,7 @@ def result_files():
(db.sequence_file.id == db.sample_set_membership.sequence_file_id) &
(db.results_file.sequence_file_id == db.sequence_file.id) &
(db.results_file.data_file != None) &
(db.results_file.hidden == False) &
config_query
)
......@@ -593,6 +596,7 @@ def custom():
& (db.sequence_file.id == db.sample_set_membership.sequence_file_id)
& (db.results_file.sequence_file_id==db.sequence_file.id)
& (db.results_file.data_file != '')
& (db.results_file.hidden == False)
& (db.config.id==db.results_file.config_id))
group_ids = get_involved_groups()
......
......@@ -12,6 +12,7 @@ def get_last_results(sequence_file, config_ids=None):
select_on_config = db.results_file.config_id.belongs(config_ids)
# First get the max run dates for the good result files
select_max_run = db((db.results_file.sequence_file_id == sequence_file)\
& (db.results_file.hidden == False)\
& (select_on_config))._select(db.results_file.run_date.max().with_alias('max'),
groupby=db.results_file.config_id)
......
......@@ -62,6 +62,7 @@ def compute_contamination(sequence_file_id, results_file_id, config_id):
& ( db.sequence_file.id == db.sample_set_membership.sequence_file_id)
& ( db.sequence_file.id != sequence_file_id[i])
& ( db.results_file.sequence_file_id == db.sequence_file.id )
& ( db.results_file.hidden == False )
& ( db.results_file.config_id == config_id[i] )
).select(db.sequence_file.ALL,db.results_file.ALL, db.sample_set.id, orderby=db.sequence_file.id|~db.results_file.run_date)
......@@ -104,6 +105,7 @@ def compute_extra(id_file, id_config, min_threshold):
result = {}
d = None
results_file = db((db.results_file.sequence_file_id == id_file) &
(db.results_file.hidden == False) &
(db.results_file.config_id == id_config)
).select(orderby=~db.results_file.run_date).first()
filename = defs.DIR_RESULTS+results_file.data_file
......@@ -184,6 +186,7 @@ def schedule_fuse(sample_set_ids, config_ids):
row = db((db.sample_set_membership.sample_set_id == sample_set_id)
& (db.sample_set_membership.sequence_file_id == db.results_file.sequence_file_id)
& (db.results_file.config_id == config_id)
& (db.results_file.hidden == False)
).select(db.sample_set_membership.sample_set_id, db.sample_set_membership.sequence_file_id,
db.results_file.id, db.results_file.config_id).first()
if row:
......@@ -649,6 +652,7 @@ def run_fuse(id_file, id_config, id_data, sample_set_id, clean_before=True, clea
& ( db.sample_set_membership.sequence_file_id == db.sequence_file.id)
& ( db.sample_set_membership.sample_set_id == sample_set_id)
& ( db.results_file.config_id == id_config )
& ( db.results_file.hidden == False)
).select( orderby=db.sequence_file.id|~db.results_file.run_date)
query = []
sequence_file_id = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment