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

{{=request.vars['id']}} {{=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 row.sequence_file.network:}}{{pass}} {{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}} {{=tag_decorator.sanitize(tag_decorator.decorate(row.sequence_file.info, 'tag', 'sequence_file', '/sample_set/custom'))}} {{=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 has_pre_process and row.sequence_file.pre_process_flag is None and row.sequence_file.data_file2 is None: }}[waiting file]{{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}} {{=row.results_file.run_date }} {{=status}} {{if row.results_file.data_file:}} {{pass}} {{if row.sequence_file.data_file != None and ( row.results_file.id == None and ( status not in ["RUNNING", "QUEUED", "ASSIGNED"]) ) and (not has_pre_process or row.sequence_file.pre_process_flag != None) :}} {{if auth.can_process_sample_set(request.vars['id']) and (config_id > 0 and auth.can_use_config(config_id)) :}} {{pass}} {{pass}}


{{if can_modify:}} {{pass}} {{ text = tag_decorator.decorate(info["info"], 'tag', sample_type, '/sample_set/all') }} {{=tag_decorator.sanitize(text)}} {{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 samples {{pass}} compare some of these samples
see results: {{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: }} export all results {{ 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}}