{{extend 'db_layout.html'}} {{import vidjil_utils}}

{{=info["name"]}}

{{=info["label"]}}
{{if auth.can_process_sample_set(request.vars['id']) :}} config {{pass}}
{{if auth.is_admin():}} {{pass}} {{for row in query :}} {{if row.results_file.scheduler_task_id is None or db.scheduler_task[row.results_file.scheduler_task_id ] is None:}} {{status = '' }} {{else:}} {{status = db.scheduler_task[row.results_file.scheduler_task_id ].status }} {{pass}} {{ has_pre_process = row.sequence_file.pre_process_id != None}} {{if auth.is_admin():}} {{pass}} {{if can_modify:}} {{else:}} {{pass}} {{if can_modify:}} {{else:}}{{pass}} {{if row.results_file.run_date :}} {{else:}}{{pass}} {{if row.results_file.id:}} {{if can_modify and auth.can_process_sample_set(request.vars['id']):}} {{else:}} {{pass}} {{else:}} {{pass}} {{pass}}
file name sampling date info size pre-process uploader last processing status
{{if auth.is_admin():}}({{=row.sequence_file.id}}){{pass}} {{=row.sequence_file.filename}} {{if row.sequence_file.sampling_date <> None:}} {{=row.sequence_file.sampling_date}} {{pass}} {{=row.sequence_file.info}} {{=vidjil_utils.format_size(row.sequence_file.size_file)}} {{if row.sequence_file.pre_process_flag == "RUN" :}}{{pass}} {{if row.sequence_file.pre_process_flag == "WAIT" :}}[queued]{{pass}} {{if row.sequence_file.pre_process_flag == "FAILED" :}}[failed] try again{{pass}} {{if row.sequence_file.pre_process_id != None :}} {{=pre_process_list[row.sequence_file.pre_process_id]}} {{pass}} {{=row.sequence_file.provider}} {{if row.sequence_file.provider:}}{{=row.sequence_file.provider.last_name}}{{pass}} dl {{=row.results_file.run_date }} {{=status}} {{if row.results_file.data_file:}} dl {{pass}} {{if row.sequence_file.data_file != None and ( row.results_file.id == None or ( status != "RUNNING" and status != "QUEUED" and status != "ASSIGNED") ):}} {{if auth.can_process_sample_set(request.vars['id']) and (config_id > 0 and auth.can_use_config(config_id)) :}} run >> sample_set_id = fake_sample_set_id {{pass}} {{pass}}


{{if can_modify:}} {{pass}} {{=info["info"]}} {{if can_upload: }} {{if not auth.can_process_sample_set(request.vars['id']) :}}
Once your data are uploaded, please request an analysis. {{pass}} {{pass}} {{if auth.can_process_sample_set(request.vars['id']) :}} {{pass}}
{{if can_upload: }} + add sample {{pass}} compare samples for this patient
see the result: {{for row in db( (db.fused_file.sample_set_id == request.vars["id"]) & (auth.vidjil_accessible_query(PermissionEnum.read_config.value, db.config) | auth.vidjil_accessible_query(PermissionEnum.admin_config.value, db.config) ) & (db.config.id ==db.fused_file.config_id) ).select() :}} {{if row.fused_file.fused_file is not None :}} {{pass}} {{=row.config.name}} {{pass}}
{{if fused_count >0:}}
{{if fused_file is not None :}} download {{=db.config[config_id].name}} .vidjil {{if analysis_count >0:}} .analysis {{pass}} {{pass}}
{{pass}}