dgenies.config_reader module

dgenies.database module

class dgenies.database.BaseModel(*args, **kwargs)[source]

Bases: peewee.Model

DoesNotExist

alias of dgenies.database.BaseModelDoesNotExist

classmethod connect()[source]
id = <peewee.PrimaryKeyField object>
class dgenies.database.Database[source]

Bases: object

nb_open = 0
class dgenies.database.Gallery(*args, **kwargs)[source]

Bases: dgenies.database.BaseModel

DoesNotExist

alias of dgenies.database.GalleryDoesNotExist

id = <peewee.PrimaryKeyField object>
job = <peewee.ForeignKeyField object>
job_id = <peewee.ForeignKeyField object>
name = <peewee.CharField object>
picture = <peewee.CharField object>
query = <peewee.CharField object>
target = <peewee.CharField object>
class dgenies.database.Job(*args, **kwargs)[source]

Bases: dgenies.database.BaseModel

DoesNotExist

alias of dgenies.database.JobDoesNotExist

batch_type = <peewee.CharField object>
date_created = <peewee.DateTimeField object>
email = <peewee.CharField object>
error = <peewee.CharField object>
gallery_set

Back-reference to expose related objects as a SelectQuery.

id = <peewee.PrimaryKeyField object>
id_job = <peewee.CharField object>
id_process = <peewee.IntegerField object>
mem_peak = <peewee.IntegerField object>
status = <peewee.CharField object>
time_elapsed = <peewee.IntegerField object>
tool = <peewee.CharField object>
class dgenies.database.MyRetryDB(database, threadlocals=True, autocommit=True, fields=None, ops=None, autorollback=False, use_speedups=True, **connect_kwargs)[source]

Bases: playhouse.shortcuts.RetryOperationalError, peewee.MySQLDatabase

class dgenies.database.Session(*args, **kwargs)[source]

Bases: dgenies.database.BaseModel

DoesNotExist

alias of dgenies.database.SessionDoesNotExist

ask_for_upload(change_status=False)[source]
date_created = <peewee.DateTimeField object>
id = <peewee.PrimaryKeyField object>
keep_active = <peewee.BooleanField object>
last_ping = <peewee.DateTimeField object>
classmethod new(keep_active=False)[source]
ping()[source]
s_id = <peewee.CharField object>
status = <peewee.CharField object>
upload_folder = <peewee.CharField object>

dgenies.tools module

class dgenies.tools.Tool(name, exec, command_line, all_vs_all, max_memory, threads=1, exec_cluster=None, threads_cluster=None, parser=None, split_before=False, help=None, order=None)[source]

Bases: object

Create a new tool

Parameters
  • command_line – command line to launch the tool

  • all_vs_all – command line in all_vs_all mode (None if not available for the tool)

  • max_memory – max memory the tool is supposed to use (ex: 40G) - for cluster submissions

  • parser – name of the function in dgenies.lib.functions to launch after mapping to have a correct PAF out file

  • split_before (bool) – True to split contigs before mapping

  • help – help message to show in run form

  • order – order to show in run mode

dgenies.views module

dgenies.views.ask_upload()[source]

Ask for upload: to keep a max number of concurrent uploads

dgenies.views.build_fasta(id_res)[source]

Generate the fasta file of query

Parameters

id_res (str) – job id

dgenies.views.build_query_as_reference(id_res)[source]

Build fasta of query with contigs order like reference

Parameters

id_res (str) – job id

dgenies.views.contact()[source]

Contact page

dgenies.views.delete_job(id_res)[source]

Delete a job

Parameters

id_res (str) – job id

dgenies.views.dl_fasta(id_res, filename)[source]

Download fasta file

Parameters
  • id_res (str) – job id

  • filename (str) – file name (not used, but can be in the URL to define download filename to the browser)

dgenies.views.documentation_dotplot()[source]

Documentation dotplot page

dgenies.views.documentation_formats()[source]

Documentation formats page

dgenies.views.documentation_result()[source]

Documentation result page

dgenies.views.documentation_run()[source]

Documentation run page

dgenies.views.download_file(id_res, filename)[source]

Download a file from a job

Parameters
  • id_res (str) – job id

  • filename (str) – file name

dgenies.views.download_paf(id_res)[source]

Download PAF file of a job

Parameters

id_res (str) – job id

dgenies.views.free_noise(id_res)[source]

Remove noise from the dot plot

Parameters

id_res (str) – job id

dgenies.views.gallery()[source]

Gallery page

dgenies.views.gallery_file(filename)[source]

Getting gallery illustration

Parameters

filename – filename of the PNG file

dgenies.views.get_backup_file(id_res)[source]

Download archive backup file of a job

Parameters

id_res (str) – job id

dgenies.views.get_file(file, gzip=False)[source]

Download a file

Parameters
  • file (str) – filename

  • gzip (bool) – is file gzipped?

dgenies.views.get_filter_out(id_res, type_f)[source]

Download filter fasta, when it has been filtered before job run

Parameters
  • id_res (str) – job id

  • type_f (str) – type of fasta (query or target)

dgenies.views.get_filter_out_query(id_res)[source]

Download query filtered fasta, when it has been filtered before job run

Parameters

id_res (str) – job id

dgenies.views.get_filter_out_target(id_res)[source]

Download target filtered fasta, when it has been filtered before job run

Parameters

id_res (str) – job id

dgenies.views.get_graph()[source]

Get dot plot data for a job

dgenies.views.get_query_as_reference(id_res)[source]

Get fasta of query with contigs order like reference

Parameters

id_res (str) – job id

dgenies.views.get_viewer_html(id_res)[source]

Get HTML file with offline interactive viewer inside

Parameters

id_res (str) – job id

dgenies.views.global_templates_variables()[source]

Global variables used for any view

dgenies.views.install()[source]

Documentation: how to install? page

dgenies.views.launch_analysis()[source]

Launch the job

dgenies.views.main()[source]

Index page

dgenies.views.no_assoc(id_res)[source]

Get contigs that match with None target

Parameters

id_res (str) – job id

dgenies.views.ping_upload()[source]

When upload waiting, ping to be kept in the waiting line

dgenies.views.post_query_as_reference(id_res)[source]

Launch build fasta of query with contigs order like reference

Parameters

id_res (str) – job id

dgenies.views.qt_assoc(id_res)[source]

Query - Target association TSV file

Parameters

id_res

Returns

dgenies.views.result(id_res)[source]

Result page

Parameters

id_res (str) – job id

dgenies.views.reverse_contig(id_res)[source]

Reverse contig order

Parameters

id_res (str) – job id

dgenies.views.run()[source]

Run page

dgenies.views.run_test()[source]

Run test page (used to simulate a real client run)

dgenies.views.send_mail(id_res)[source]

Send mail

Parameters

id_res (str) – job id

dgenies.views.sort_graph(id_res)[source]

Sort dot plot to referene

Parameters

id_res (str) – job id

dgenies.views.status(id_job)[source]

Status page

Parameters

id_job (str) – job id

dgenies.views.summary(id_res)[source]

Get Dot plot summary data

Parameters

id_res (str) – job id

dgenies.views.upload()[source]

Do upload of a file