diff --git a/README.md b/README.md index b2647ccccc0494e3b724f6f60264365935adc473..0e3c428a1b3a4baf19b7ebdf7e9616063bedcaf2 100755 --- a/README.md +++ b/README.md @@ -6,9 +6,25 @@ They are based on the [Galaxy Genome Annotation (GGA) project](https://galaxy-ge A stack of Docker services is deployed for each species, from an input yaml file describing the data. See `examples/example.yml` for an example of what information can be described and the correct formatting of this input file. +The services currently deployed are: +- Chado database +- Tripal: database interface and hub to all applications +- Elasticsearch: searching service used in Tripal +- JBrowse: genome browser +- Nginx proxy: page to download the data files +- Blast (optional): BLAST interface to query the data +- Galaxy: data loading orchestrator for administrators + A GGA environment is deployed for each different species at [https://hostname/sp/genus_species/](https://hostname/sp/genus_species/). Multiple strains can have the same species and are deployed in the same GGA environment. + +_**Figure** : Schematic representation of a set of Docker containers deployed with +GGA for typical genomes. Cuboids represent Docker containers. Hexagons represent different +sets of Docker containers. Blue arrows represent HTTP traffic. Gray arrows represent +data exchange performed using Galaxy tools. Black arrows represent data exchange +inherent in applications._ + ## Requirements To run the gga_load_data tools, Python 3.6 and the packages listed in [requirements.txt](./requirements.txt) are required. @@ -22,8 +38,8 @@ and a [swarm](https://docs.docker.com/engine/swarm/swarm-tutorial) (for cluster Traefik is a reverse proxy which allows to direct HTTP traffic to various Docker Swarm services. The Traefik dashboard is deployed at [https://hostname/traefik/](https://hostname/traefik/) -Authelia is an authentication agent, which can be plugged to an LDAP server, and that Traefik can you to check permissions to access services. -The authentication layer is optional. If used, the config file needs the variables `https_port`, `authentication_domain_name`, `authelia_config_path`. +Authelia is an authentication agent, which can be plugged to an LDAP server, and that Traefik can used to check permissions to access services. +The authentication layer is optional. If used, the config file needs the variables `https_port`, `authentication_domain_name`, `authelia_config_path`, `authelia_secrets_env_path`, `authelia_db_postgres_password`. Authelia is accessed automatically by Traefik to check permissions everytime someones wants to access a page. If the user is not logged in, he is redirected to the authelia portal. diff --git a/constants.py b/constants.py index 70724c3eb93de567dabf2855a0872c50bbb0cd83..2a50710854fd9409a9197fb0919d8f5da8630d6d 100644 --- a/constants.py +++ b/constants.py @@ -23,6 +23,7 @@ ORG_PARAM_DATA_OGS_VERSION = "ogs_version" ORG_PARAM_DATA_PERFORMED_BY = "performed_by" ORG_PARAM_SERVICES = "services" ORG_PARAM_SERVICES_BLAST = "blast" +ORG_PARAM_SERVICES_GO = "go" # Constants used in the config yaml file diff --git a/examples/citrus_sinensis.yml b/examples/citrus_sinensis.yml index 63483e4e70dde45425a68185cf51ef18587ef403..38087bbe0cfe9b87dbd6519ddebd32730aab1dc7 100644 --- a/examples/citrus_sinensis.yml +++ b/examples/citrus_sinensis.yml @@ -18,7 +18,7 @@ # Paths to the different datasets to copy and import into the galaxy container (as a shared library) # Must be absolute paths to the dataset genome_path: /path/to/repo/examples/src_data/genome/v1.0/Citrus_sinensis-scaffold00001.fasta # Mandatory! - transcripts_path: /path/to/repo/examples/src_data/annotation/v1.0/Citrus_sinensis-orange1.1g015632m.g.fasta # Mandatory! + transcripts_path: /path/to/repo/examples/src_data/annotation/v1.0/Citrus_sinensis-orange1.1g015632m.g.fasta proteins_path: # Mandatory! gff_path: /path/to/repo/examples/src_data/annotation/v1.0/Citrus_sinensis-orange1.1g015632m.g.gff3 # Mandatory! interpro_path: /path/to/repo/examples/src_data/annotation/v1.0/functional_annotation/Citrus_sinensis-orange1.1g015632m.g.iprscan.xml @@ -33,6 +33,6 @@ ogs_version: 1.0 performed_by: services: - # List the optional services to be deploy in the stack - # By default, only tripal, tripaldb, galaxy, jbrowse and elasticsearch services will be deployed - blast: 0 \ No newline at end of file + # List the optional services/resources to add + blast: 0 # "1" to add links to blast form, "some/url" to specify, multiple urls as "Name1=url1&Name2=url2", "0" to disable it. Default: "0" + go: 1 # "1" to add links to GO summary, "0" to disable it. Default: "0" \ No newline at end of file diff --git a/gga_init.py b/gga_init.py index 6c2f7029bf9f7898deaf172f2303565406cfb9c3..a4fdb0139b9f593f887c1def9e8690e61b6fd7e8 100755 --- a/gga_init.py +++ b/gga_init.py @@ -130,7 +130,7 @@ class DeploySpeciesStack(speciesData.SpeciesData): "genus_species": self.genus_species, "genus_species_strain_sex": self.species_folder_name, "genus_species_sex": "{0}_{1}_{2}".format(self.genus_lowercase, self.species_lower(), self.sex), "strain": self.strain, "sex": self.sex, "Genus_species": "{0} {1}".format(self.genus_uppercase, self.species_lower()), - "blast": self.blast, "picture_path": self.picture_path} + "blast": self.blast, "go": self.go, "picture_path": self.picture_path} if (len(self.config.keys()) == 0): logging.error("Empty config dictionary") # Merge the two dicts diff --git a/images/gga_schema.png b/images/gga_schema.png new file mode 100644 index 0000000000000000000000000000000000000000..c1b55fc01176684256778e2d408450d65d1c0a7d Binary files /dev/null and b/images/gga_schema.png differ diff --git a/speciesData.py b/speciesData.py index 34c817fd23e93710c086b1534d0207730fcfc83f..d505da605add1aa724505b30a9973e919a05da80 100755 --- a/speciesData.py +++ b/speciesData.py @@ -47,12 +47,18 @@ class SpeciesData: else: return string + def set_service_attribute(self, attribute, service, parameters_dictionary): + parameters_dictionary_services = parameters_dictionary[constants.ORG_PARAM_SERVICES] + if(service in parameters_dictionary_services.keys()): + attribute = parameters_dictionary_services[service] + else: + attribute = "0" + def __init__(self, parameters_dictionary): self.parameters_dictionary = parameters_dictionary self.name = parameters_dictionary[constants.ORG_PARAM_NAME] parameters_dictionary_description=parameters_dictionary[constants.ORG_PARAM_DESC] parameters_dictionary_data = parameters_dictionary[constants.ORG_PARAM_DATA] - parameters_dictionary_services = parameters_dictionary[constants.ORG_PARAM_SERVICES] self.species = self.clean_string(parameters_dictionary_description[constants.ORG_PARAM_DESC_SPECIES]) self.genus = self.clean_string(parameters_dictionary_description[constants.ORG_PARAM_DESC_GENUS]) @@ -83,10 +89,8 @@ class SpeciesData: self.blastx_path = parameters_dictionary_data[constants.ORG_PARAM_DATA_BLASTX_PATH] self.orthofinder_path = parameters_dictionary_data[constants.ORG_PARAM_DATA_ORTHOFINDER_PATH] - if(constants.ORG_PARAM_SERVICES_BLAST in parameters_dictionary_services.keys()): - self.blast = parameters_dictionary_services[constants.ORG_PARAM_SERVICES_BLAST] - else: - self.blast = "0" + self.set_service_attribute(self.blast, constants.ORG_PARAM_SERVICES_BLAST, parameters_dictionary) + self.set_service_attribute(self.go, constants.ORG_PARAM_SERVICES_GO, parameters_dictionary) if constants.ORG_PARAM_DESC_PICTURE_PATH in parameters_dictionary_description.keys(): self.picture_path = parameters_dictionary_description[constants.ORG_PARAM_DESC_PICTURE_PATH] diff --git a/templates/gspecies_compose.yml.j2 b/templates/gspecies_compose.yml.j2 index 97dbb0000bcf779a9f6667d5376d24f888c096be..1b1e8f8f692ff0d745dc27448c196bd3dd1ba617 100644 --- a/templates/gspecies_compose.yml.j2 +++ b/templates/gspecies_compose.yml.j2 @@ -65,7 +65,7 @@ services: ENABLE_BLAST: {{ blast }} ENABLE_DOWNLOAD: 1 ENABLE_WIKI: 0 - ENABLE_GO: 0 + ENABLE_GO: {{ go }} ENABLE_ORTHOLOGY: 0 ENABLE_ORTHOLOGY_LINKS: 0 THEME: "{{ tripal_theme_name }}" # Use this to use another theme diff --git a/templates/organisms.yml.j2 b/templates/organisms.yml.j2 index 9a05ccfc4c8abfee341532cf0e2464714a8882cc..019fce089740ba1634b15f2756f8d04e5fa2e5f3 100644 --- a/templates/organisms.yml.j2 +++ b/templates/organisms.yml.j2 @@ -23,4 +23,5 @@ {{ org_param_data_ogs_version }}: {{ org_param_data_ogs_version_value }} {{ org_param_data_performed_by }}: {{ org_param_data_performed_by_value }} {{ org_param_services }}: - {{ org_param_services_blast }}: {{ org_param_services_blast_value }} \ No newline at end of file + {{ org_param_services_blast }}: {{ org_param_services_blast_value }} + {{ org_param_services_go }}: {{ org_param_services_go_value }} \ No newline at end of file diff --git a/utilities.py b/utilities.py index f08c11b25b25d1e4a65eeb2685acc68f987c01f1..bcee45e1c931fc5330951ecbad078089d27e6181 100755 --- a/utilities.py +++ b/utilities.py @@ -236,5 +236,6 @@ def create_org_param_dict_from_constants(): org_param_dict["org_param_data_performed_by"] = constants.ORG_PARAM_DATA_PERFORMED_BY org_param_dict["org_param_services"] = constants.ORG_PARAM_SERVICES org_param_dict["org_param_services_blast"] = constants.ORG_PARAM_SERVICES_BLAST + org_param_dict["org_param_services_go"] = constants.ORG_PARAM_SERVICES_GO return org_param_dict