dgenies.run¶
- dgenies.run.init(s_id, allowed_ext, max_upload_file_size, target_example, query_example, tool_has_ava)¶
Initialise app for run page
- Arguments
s_id (
string()
) – session idallowed_ext (
object()
) –max_upload_file_size (
int()
) – maximum upload file sizetarget_example (
string()
) – target example pseudo pathquery_example (
string()
) – query example pseudo pathtool_has_ava (
object()
) – defines if each available tool has an all-vs-all mode
- dgenies.run.add_error(error)¶
Add an error to the form
- Arguments
error (
string()
) – error message to display
- dgenies.run.allowed_file(filename, formats)¶
Check if a file has a valid format
- Arguments
filename (
string()
) – filenameformats (
array()
) – expected file format
- Returns
boolean – true if valid, else false
- dgenies.run.ask_for_upload()¶
Ask server to start uploads
- dgenies.run.change_fasta_type(fasta, type, keep_url)¶
Change source of fasta (local or url)
- Arguments
fasta (
string()
) – type of fasta (query, target, …)type (
string()
) – source of fasta (local or url)keep_url (
boolean()
) – if true, keep url in form, else empty it
- dgenies.run.check_url(url)¶
Check if an URL is valid
- Arguments
url (
string()
) – the url to check
- Returns
boolean – true if valid, else false
- dgenies.run.disable_form()¶
Disable run form
- dgenies.run.do_submit()¶
Do form submit staff (done once all uploads are done successfully)
- dgenies.run.enable_form()¶
Enable run form
- dgenies.run.fill_examples()¶
Fill inputs with example data
- dgenies.run.get_file_size_str(size)¶
Get file size (human readable)
- Arguments
size (
int()
) – file size in bytes
- Returns
string – human readable size
- dgenies.run.hide_loading(fasta)¶
Hide loading for a fasta uploaded file
- Arguments
fasta (
string()
) – uploaded file type (query, target, …)
- dgenies.run.hide_success(fasta)¶
Hide success on a file
- Arguments
fasta (
string()
) – type of file (query, target, …)
- dgenies.run.init_fileuploads()¶
Init file upload forms
- dgenies.run.ping_upload()¶
Ping server: we still upload or wait for upload
- dgenies.run.reset_errors()¶
Remove all errors displayed
- dgenies.run.reset_file_form(tab, except_backup)¶
Reset all inputs in the given tab
- Arguments
tab (
string()
) – tab nameexcept_backup (
boolean()
) – if true, don’t reset backup input
- dgenies.run.reset_file_input(inp_name)¶
Reset file input
- Arguments
inp_name (
string()
) – type of fasta (query, target, …)
- dgenies.run.restore_form()¶
Restore run form
- dgenies.run.set_events()¶
Initialise events
- dgenies.run.set_filename(name, fasta)¶
Set filename for input fasta
- Arguments
name (
string()
) – filenamefasta (
string()
) – type of fasta (query, target, …)
- dgenies.run.show_global_loading()¶
Show global loading
- dgenies.run.show_loading(fasta)¶
Show loading for a fasta uploading file
- Arguments
fasta (
string()
) – uploading file type (query, target, …)
- dgenies.run.show_success(fasta)¶
Show success: file uploaded successfully
- Arguments
fasta (
string()
) – uploaded type of file (query, target, …)
- dgenies.run.show_tab(tab)¶
Change displayed tab
- Arguments
tab (
string()
) – id of the tab to show
- dgenies.run.start_uploads()¶
Launch upload of files
- dgenies.run.submit()¶
Submit form
- dgenies.run.upload_next()¶
Upload next file
- Returns
boolean – true if there is a next upload, else false and run submit
- dgenies.run.valid_form()¶
Validate form
- Returns
boolean – true if form is valid, else false
- dgenies.run.__upload_server_error(fasta, data)¶
Notify and reanable form on upload server error
- Arguments
fasta (
string()
) – fasta file (name) which failsdata – data from server call
- dgenies.run._init_fileupload(ftype, formats, position)¶
Init file upload forms staff
- Arguments
ftype (
string()
) – type of file (query, target, …)formats (
array()
) – valid formatsposition (
int()
) – position of file in the upload queue
- dgenies.run._set_file_event(ftype)¶
Initialise file change events
- Arguments
ftype (
string()
) – type of file (query, target, …)
- dgenies.run._set_file_select_event(ftype)¶
Initialise change source of file (local, url) event
- Arguments
ftype (
string()
) – type of file (query, target, …)
- dgenies.run._start_upload(ftype, fname)¶
Start upload staff
- Arguments
ftype – type of file (query, target, …)
fname – fasta name
- Returns
boolean – true if has uploads