diff --git a/docs/assets/diploid_genotype.png b/docs/assets/diploid_genotype.png
new file mode 100644
index 0000000..c7aa287
Binary files /dev/null and b/docs/assets/diploid_genotype.png differ
diff --git a/docs/assets/gi_add.png b/docs/assets/gi_add.png
new file mode 100644
index 0000000..8a7c8b4
Binary files /dev/null and b/docs/assets/gi_add.png differ
diff --git a/docs/assets/gi_constrains_website.svg b/docs/assets/gi_constrains_website.svg
new file mode 100644
index 0000000..f223561
--- /dev/null
+++ b/docs/assets/gi_constrains_website.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/docs/assets/gi_pick_phenotype.png b/docs/assets/gi_pick_phenotype.png
new file mode 100644
index 0000000..828ff48
Binary files /dev/null and b/docs/assets/gi_pick_phenotype.png differ
diff --git a/docs/describing_alleles.md b/docs/describing_alleles.md
new file mode 100644
index 0000000..fd3a7d3
--- /dev/null
+++ b/docs/describing_alleles.md
@@ -0,0 +1,175 @@
+---
+hide:
+ - toc
+---
+
+## Allele description rules
+
+!!! warning "These are rules for allele descriptions, not names!"
+
+| Allele type | Example |
+| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
+| amino acid insertion | A858AMKGYP (insertion of MKGYP after A858, note A before and after number) |
+| amino acid substitution(s) | K132A or F256A,F310A |
+| amino acid insertion and substitution | A858AMKGYP,F124D |
+| amino acid insertion and deletion | A858AMKGYP,100-200,P500* |
+| partial deletion and amino acid change | 100-200,F124D,P500* |
+| partial deletion, amino acid | Specify deleted residues - eg. 100-200 OR 10-20,40-50. Use P500* for nonsense mutation |
+| nucleotide insertion | C132CAATTT (insertion of AATTT after C132, note C before and after number) |
+| nucleotide substitution(s) | A25G, OR A(-25)G (for residues upstream of ATG -protein coding- or transcription start -RNA genes-) |
+| partial deletion, nucleotide | Specify deleted residues - eg. 100-200 OR (-20)-(-30) (for residues upstream of ATG -protein coding- or transcription start -RNA genes-) |
+| partial deletion and nucleotide change | 100-200,A124T,C128G (for residues upstream of ATG -protein coding- or transcription start -RNA genes- use negative numbers in parenthesis) |
+| nucleotide insertion and substitution | T858TAAGA,T(-124)A (for residues upstream of ATG -protein coding- or transcription start -RNA genes- use negative numbers in parenthesis) |
+
+## Allele naming rules
+
+!!! warning "These are rules for allele names, not descriptions!"
+
+
+
+
+
+
Variant type
+
+
+
Example
+
+
+
+
+
Wild type
+
+
+
ase1+
+
+
+
+
+
Knockout / deletion
+
+
+
ase1Δ
+
+
+
+
+
Partial deletion
+
+
+
Indicate what’s left
+
+
+
ase1(1-35)
+
ase1(1-35, 40-700)
+
+
+
+
+
Indicate what’s missing
+
+
+
ase1Δ(114-120)
+
ase1Δ(114-120,150-200)
+
+
+
+
+
Residue insertion
+
+
+
ase1-P114PVPAL
+
+
+
+
+
Substitution or deletion-insertion
+
+
+
Single residues
+
+
+
ase1-P114A,Q117A
+
ase1-P114*
+
+
+
+
+
Consecutive residues
+
+
+
ase1-PLI114AAA
+
ase1-PLI114LAVKK
+
+
+
+
+
Combinations of the above
+
+
+
ase1Δ(10-20)-P114A,Q117A
+
+
+
+
+
Forward genetics, variant unknown
+
+
+
ase1-35 (must be unique)
+
+
+
+
+
CTD
+
+
+
All repeats mutated
+
+
+
rpb1-CTD-Y1F
+
+
+
+
+
Some repeats mutated
+
+
+
rpb1-CTD-Y1F(r1-r12)
+
+
+
+
+
Some repeats deleted
+
+
+
rpb1-CTD-Δ(r11-r29)
+
+
+
+
+
Motifs mutated every 2 repeats, from repeat 1 to 29.
+
+
+
rpb1-CTD-Y1F(r1-r29-2)
+
+
+
+
+
Combinations of the above
+
+
+
rpb1-CTD-S5A(r1-r12)Δ(r13-r29)
+
+
+
+
+
CTD and non-CTD mutations
+
+
+
rpb1-N494D-CTD-Δ(r11-r29)
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/faqs.md b/docs/faqs.md
new file mode 100644
index 0000000..70e55e2
--- /dev/null
+++ b/docs/faqs.md
@@ -0,0 +1,28 @@
+
+## Phenotype annotations
+
+### How do I indicate that a mutation or deletion is viable?
+
+Annotate a genotype including that allele to `viable vegetative cell population`. Viability can depend on conditions and other alleles present on the genotype. See [phenotypes](./phenotypes.md)
+
+### How do I indicate that a mutation or deletion is lethal?
+
+Annotate a genotype including that allele to `inviable vegetative cell population`. Lethality can depend on conditions and other alleles present on the genotype. See [phenotypes](./phenotypes.md)
+
+### How do I indicate that an allele is thermosensitive?
+
+Annotate a genotype including that allele to `inviable vegetative cell population`, including `high temperature` or `low temperature` as a condition. See [phenotypes](./phenotypes.md)
+
+## Genotype management
+
+### What's the difference between "Wild type product level" and "Not assayed"?
+
+Historically, `Wild type product level` and `Not assayed` have been used interchangeably when a non-wild type allele is expressed from the endogenous locus. We recommend `Not assayed` if you have not measured expression. See [Genotype management](./genotype_management.md)
+
+### What to do when control strains over-express the wild-type allele, or express it from a plasmid?
+
+PomBase does not capture the difference between strains expressing an allele from a plasmid or the native locus in phenotype annotations. Similarly, we do not have a way to capture the fact that the control of an experiments is over-expressing the wild-type allele. Therefore, if both the wild-type (control) and mutant allele are over-expressed / knocked-down, ???. See [Genotype management](./genotype_management.md)
+
+### What if the wild-type copy is still present in a mutant strain?
+
+Multi-loci phenotype can be used to indicate that the wild-type allele is still present in a strain expressing an allele of that gene. For example, a strain that bears both the wild type _cdc25_ and the mutant allele _cdc25-22_. For this purpose, you can create a wild-type allele with expression level `Wild type product level`. See [Genotype management](./genotype_management.md)
\ No newline at end of file
diff --git a/docs/genes_alleles_genotypes.md b/docs/genes_alleles_genotypes.md
deleted file mode 100644
index 3e8f523..0000000
--- a/docs/genes_alleles_genotypes.md
+++ /dev/null
@@ -1,24 +0,0 @@
----
-hide:
- - toc
----
-## Video summary
-
-
-
-
-
-
-## Adding genes to a session
-
-The first thing you should do, is add blah
-
-If you are not curating phenotypes or genetic interactions for this paper, you can stop here.
-
-## Adding genotypes with a single allele
-
-blah blah
-
-## Adding genotypes with multiple alleles
-
-blah blah
diff --git a/docs/genetic_interaction.md b/docs/genetic_interaction.md
index 2d8d488..b2fe475 100644
--- a/docs/genetic_interaction.md
+++ b/docs/genetic_interaction.md
@@ -3,9 +3,7 @@ hide:
- toc
---
-!!! info "Before starting"
- * To add genetic interactions, you need to add phenotypes first: see [how to add phenotypes](./phenotypes.md).
- * Canto supports 9 types of genetic interactions depending on the phenotypes and genotypes involved, see [PomBase genetic interaction documentation](https://www.pombase.org/documentation/genetic-and-physical-interactions).
+!!! info "To add genetic interactions, you need to add phenotypes first: see [how to add phenotypes](./phenotypes.md)."
## Video summary
@@ -15,3 +13,32 @@ hide:
+## Adding genetic interactions
+
+??? warning "Do you know about all types of genetic interactions?"
+
+ Canto supports 9 types of genetic interactions depending on the phenotypes and genotypes involved, see [PomBase genetic interaction documentation](https://www.pombase.org/documentation/genetic-and-physical-interactions).
+
+ The language often used in publications does not match the naming of genetic interactions. For example, in publications we can find "double deletion of gene X and Y rescues the defects cellular morphology caused by deletion of gene Y". However, for BioGRID this is a phenotypic suppression not a rescue, since rescue is reserved for lethality or growth defect.
+
+ Below is a decision making tree to determine the type of genetic interaction from the phenotypes of the single and double mutant. "Interacting allele" refers to the allele that is not present in the single mutant:
+
+ ![Decision making for genetic interactions](assets/gi_constrains_website.svg)
+
+To start a genetic interaction annotation, you need a multi-locus phenotype that involves two genes:
+
+ * Click `add...` in the Genotype field of an existing multi-locus phenotype annotation.
+
+ ![](assets/gi_add.png)
+
+ * This opens a window that lets you delete existing genetic interactions, or add new ones.
+ * To delete a genetic interaction, click on the red cross on the right of the annotation.
+ * To create a new genetic interaction, click on `Add interaction...`.
+ * Select the annotation type and click `OK`.
+ * For some interactions, you will be asked to indicate the directionality
+ * Then, you may be asked to link the genetic interaction to the single-locus phenotype, do so by clicking on the white box on the right of the listed annotations.
+
+ ![](assets/gi_pick_phenotype.png)
+
+ * If that is the case, and you have not annotated the single locus phenotype yet, you can do it directly from the Genetic Interaction interface by clicking on `Add phenotype ...`.
+
diff --git a/docs/genotype_management.md b/docs/genotype_management.md
new file mode 100644
index 0000000..16af9d1
--- /dev/null
+++ b/docs/genotype_management.md
@@ -0,0 +1,58 @@
+---
+hide:
+ - toc
+---
+
+??? info "Did you forget to add genes to the session or you want to remove some?"
+ In the main menu, click on `Edit gene list` on the right side of the interface.
+
+ * To remove genes, tick the boxes on the right, then click `Remove selected`. You can only delete genes that have not been used for annotations.
+ * To add genes, click `Add more genes from ...`.
+ * You can add multiple genes separated by any spacer (space, commas, line breaks).
+ * You can refer to genes by their systematic id (SPAC3G9.12), primary name (peg1) or a synonym (cls1).
+ * If a gene name is also the synonym of another gene (e.g. psu1), you will be asked to provide a primary name for that gene.
+
+## Video summary
+
+
+
+
+
+
+
+## Creating genotypes
+
+On the left side of the session page, click on `Genotype management`. This will take you to a screen where you can see all the genes you have added to the session.
+
+### Creating single-locus genotypes
+
+* To create a genotype with a deletion allele, click on `Deletion`.
+* To create a genotype where the expression level of the wild-type allele is altered, click on `Other Genotype` and select `wild type` as `allele type`. Then select the expression level.
+* For others, click on `Other Genotype`, then:
+ * First, check if the allele you want to use already exist by writing its name on the `Allele name` text box. If you find it, click on it, and the allele details will be imported from PomBase.
+ * Otherwise, create a new allele:
+ * Give it the name that it has in the publication. Ideally, the name should follow [our guidelines](./describing_alleles.md#allele-naming-rules).
+ * Select the type of allele, and add an allele description following the displayed example. See [all description examples](./describing_alleles.md#allele-description-rules).
+ * Finally, select the expression level and click `OK`.
+
+### Creating diploid loci
+
+* If you want to make a diploid genotype with two different alleles, they must exist as separate single-locus genotypes.
+* Start from a haploid single-locus genotype that contains one of the desired alleles, and tick the box on its left.
+
+ ![](assets/diploid_genotype.png)
+
+* Then, click on `Create diploid locus`, there you can choose to create either:
+ * An homozygous locus with the starting allele.
+ * An heterozygous locus with the starting allele and the wild-type.
+ * An heterozygous locus with the starting allele and another allele from the session (choose from the dropdown).
+* Then click `OK`.
+
+### Creating multi-locus genotypes
+
+* Select all single-locus genotypes that you want to combine in a multi-locus genotype, by ticking the boxes on their left.
+
+ ![](assets/diploid_genotype.png)
+
+* Click the button `Combine selected genotypes`.
+* You can also create diploid multi-locus genotypes by combining diploid single-locus genotypes.
diff --git a/docs/index.md b/docs/index.md
index cd9a026..7f7659d 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -21,6 +21,7 @@ This site contains a step-by-step video and text guide for curating a paper usin
* The tutorials in this page use Canto advanced mode, it can be activated as shown below:
+
* If you are unfamiliar with what annotation means, and how ontology terms are used for this, visit our [brief intro to annotation](./intro_annotation.md).
## Creating annotations
diff --git a/docs/javascript/did_you_know.js b/docs/javascript/did_you_know.js
new file mode 100644
index 0000000..47a6f42
--- /dev/null
+++ b/docs/javascript/did_you_know.js
@@ -0,0 +1,19 @@
+// A simple script that displays a random did you know message at the footer
+
+const allMessages = [
+ 'Canto has ways to save time during curation, visit our productivity page.',
+ 'You can submit high-throughput datasets of genetic and physical interactions to BioGrid, and they will appear in PomBase.',
+ 'You can submit high-throughput annotations of GO, phenotype, modification, or gene expression data, visit our data submission documentation.',
+ 'You can submit sequence-linked data, and they will appear in PomBase genome browser. Visit our data submission documentation.'
+]
+
+const randomMessage = allMessages[Math.floor(Math.random() * allMessages.length)]
+
+// Set the initial message
+
+const footer = document.getElementsByClassName('md-footer-meta__inner')[0]
+
+const message = document.createElement('p')
+message.innerHTML = 'Did you know? 🤔 ' + randomMessage
+
+footer.appendChild(message)
diff --git a/docs/phenotypes.md b/docs/phenotypes.md
index 01c2149..1beb10d 100644
--- a/docs/phenotypes.md
+++ b/docs/phenotypes.md
@@ -16,7 +16,7 @@ hide:
## Making an annotation
On the `Quick Links` list, click on `Phenotype` to open a window that requires you to indicate:
-****
+
* **Genotype:** you can choose from the genotypes added to the session from a dropdown (see [how to add genotypes](./genes_alleles_genotypes.md)). Click on the magnifying glass on the right to use a search box instead of a drop-down menu.
* **Term name:** a FYPO term describing the phenotype associated with the genotype you selected above.
* Start typing a phenotype in the search box. If you do not find the precise phenotype you are looking for, choose a broad term (e.g. abnormal spindle) that can be refined later.
@@ -34,9 +34,11 @@ On the `Quick Links` list, click on `Phenotype` to open a window that requires y
* **Catalytic activity phenotypes:** similarly, if a mutation in enzyme X affects its activity, still specify gene X in `assayed enzyme`, and if X auto-phosphorylates, indicate it in `assayed substrate`. A mutation in gene X may also affect catalytic activity of Y, then use Y in `assayed enzyme`
* **Interaction phenotypes:** Indicate always two gene products. Mutation in gene X may affect interaction of proteins Z and Y, or of protein X with Y. If a mutation affects a protein/RNA interaction with itself, add the same protein twice.
* **Assayed region extension:** depending on the phenotype, you will be able to select from either:
- * **Genes:** e.g. to indicate that a mutation gene X causes "abnormal chromatin organization" in the region of gene Y, you select `assayed region or gene` with gene Y. If several genes are affected, create multiple annotations.
- * **Sequence ontology term:** to indicate that the phenotype affects a type of sequence (e.g. `centromeric repeat`).
+ * **Genes:** e.g. to indicate that a mutation gene X causes "abnormal chromatin organization" in the region of gene Y, you select `assayed region or gene` with gene Y. If several genes are affected, create multiple annotations.
+ * **Sequence ontology term:** to indicate that the phenotype affects a type of sequence (e.g. `centromeric repeat`).
* **Evidence code:** the type of experiment where the phenotype was observed.
* **Conditions:** Conditions are aspects of the experimental setup that are **independent of what cells, strain, organism, etc. are used**. Type and select from the autocomplete options. Several conditions can be added, and capture the medium or temperature used, presence of chemicals, agar plates or liquid culture, etc.
* **Comment:** it's very useful for us if you indicate the figure or table where this phenotype comes from.
+
+!!! question "These are just the basics, more info and edge cases can be found in the [FAQs](faqs.md#phenotype-annotations)"
\ No newline at end of file
diff --git a/docs/physical_interaction.md b/docs/physical_interaction.md
index d74a755..712c48a 100644
--- a/docs/physical_interaction.md
+++ b/docs/physical_interaction.md
@@ -8,4 +8,8 @@ hide:
-
\ No newline at end of file
+
+
+## Making an annotation
+
+High-throughput
\ No newline at end of file
diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css
index da561b6..a7af0f3 100644
--- a/docs/stylesheets/extra.css
+++ b/docs/stylesheets/extra.css
@@ -4,6 +4,7 @@
--md-primary-fg-color--dark: #15334e;
--md-accent-fg-color: #337ab7;
--md-accent-fg-color--transparent: #3379b71c;
+ --md-footer-bg-color--dark: none;
}
div.video-sizer {
@@ -44,6 +45,11 @@ div.video-wrapper iframe {
margin-bottom: .25em;
}
+.md-typeset h3 {
+ margin-top: .5em;
+ margin-bottom: .25em;
+}
+
.md-typeset h1 {
margin-bottom: .5em;
}
@@ -55,4 +61,46 @@ div.video-wrapper iframe {
.md-typeset li details {
margin-bottom: 0px;
margin-top: 0px;
+}
+
+/* Footer to display messages */
+.md-typeset table:not([class]) td{
+ vertical-align: middle;
+ text-align: center;
+}
+
+.md-footer {
+ box-sizing: unset;
+ height: auto;
+}
+
+.md-footer-meta__inner {
+ text-align: center;
+ display: block;
+ padding: 0;
+}
+
+.md-copyright {
+ display: none;
+}
+
+footer.md-footer {
+ position: fixed;
+ bottom: 0;
+ width: 100%;
+ height: 30px; /* replace with actual footer height */
+}
+
+footer.md-footer p{
+ padding: 0;
+ margin: 0;
+}
+
+/* Some extra padding so the footer always fits */
+main {
+ padding-bottom: 80px;
+}
+
+.md-sidebar__scrollwrap {
+ padding-bottom: 20px;
}
\ No newline at end of file
diff --git a/mkdocs.yml b/mkdocs.yml
index 05136c5..59b6df9 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -5,7 +5,8 @@ theme:
logo: assets/canto_logo.svg
favicon: assets/favicon.ico
features:
- - navigation.instant
+ # This messed up the custom footer
+ # - navigation.instant
- content.action.edit
- navigation.expand
@@ -15,10 +16,15 @@ markdown_extensions:
- admonition
- pymdownx.details
- pymdownx.superfences
+ - md_in_html
+ - attr_list
+
extra_css:
- stylesheets/extra.css
+extra_javascript:
+ - javascript/did_you_know.js
plugins:
- search
@@ -32,8 +38,8 @@ extra:
nav:
- Home: index.md
- - Genes, alleles and genotypes: genes_alleles_genotypes.md
- How to annotate:
+ - Genotype management: genotype_management.md
- GO Biological Process: go_BP.md
- GO Cellular Component: go_CC.md
- GO Molecular Function: go_MF.md
@@ -46,4 +52,6 @@ nav:
- Other:
- Introduction to annotation: intro_annotation.md
- Requesting to curate a paper: request_curation_session.md
- - Productivity tricks: productivity.md
\ No newline at end of file
+ - Productivity tricks: productivity.md
+ - Describing alleles: describing_alleles.md
+ - FAQs: faqs.md
\ No newline at end of file
diff --git a/poetry.lock b/poetry.lock
index 287bf39..af815f6 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -940,4 +940,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p
[metadata]
lock-version = "2.0"
python-versions = "^3.9"
-content-hash = "29812f6c00d86f16c69ec978d3561e1914014ac2140e5c9a986763fc7422f653"
+content-hash = "700bc66c8a4cc171250caab9492fe063cc82ed90758d4dd25fa4887d518ba508"
diff --git a/pyproject.toml b/pyproject.toml
index 6e2c09c..719c125 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -8,3 +8,4 @@ version = "0.1.0"
python = "^3.9"
mkdocs = "^1.5.2"
mkdocs-material = "^9.2.5"
+requests = "^2.31.0"
diff --git a/scripts/generate_allele_nomenclature_from_canto.py b/scripts/generate_allele_nomenclature_from_canto.py
new file mode 100644
index 0000000..4cc4f13
--- /dev/null
+++ b/scripts/generate_allele_nomenclature_from_canto.py
@@ -0,0 +1,10 @@
+import requests
+import yaml
+
+toml_string = requests.get('https://raw.githubusercontent.com/pombase/canto/master/canto.yaml').text
+# read yaml from string
+canto_config = yaml.load(toml_string, Loader=yaml.FullLoader)
+
+for allele_type in canto_config['allele_type_list']:
+ if 'amino' in allele_type['name'] or 'nucleotide' in allele_type['name']:
+ print(allele_type['name'], allele_type['placeholder'], sep='\t')