Compare commits

..

No commits in common. "bd8093a7209eeebd6d612c7b9f444c165b3b94b9" and "332876f58ce27a8b062d083e317470d50ba2e12b" have entirely different histories.

2 changed files with 25 additions and 28 deletions

View File

@ -355,12 +355,6 @@ class ErrorMessage():
msg += "If the those values are Pubmed ids or DOIs, please ignore this messsage"
return msg
def STD46(self):
msg = f"If date of collection/isolation/deposit/inclusion in the catalog is after 2014," \
f" the value of column Geographic Origin must be provided and associated with a country in the " \
f"Geographic Origin sheet. The value is missing or not associated with a country for strain {self.pk}."
return msg
"""
Genomic Information Error Codes
@ -382,7 +376,7 @@ class ErrorMessage():
return f"The 'Marker' for genomic information with Strain AN {self.pk} is missing."
def GID06(self):
return f"The value of 'Marker' {self.value} is not in the Markers sheet."
return f"The 'Marker' for genomic information with Strain AN {self.pk} is incorrect."
def GID07(self):
return f"The 'INSDC AN' column is a mandatory field in the Genomic Information Sheet. The column can not be empty."

View File

@ -3,9 +3,9 @@ from mirri.validation.tags import (CHOICES, COLUMNS, COORDINATES, CROSSREF, CROS
MISSING, MULTIPLE, NAGOYA, NUMBER, REGEXP, ROW_VALIDATION, SEPARATOR, TAXON, TYPE,
UNIQUE,
VALIDATION, VALUES, BIBLIO)
from mirri.settings import (ONTOBIOTOPE, LOCATIONS, GROWTH_MEDIA, GENOMIC_INFO,
STRAINS, LITERATURE_SHEET, SEXUAL_STATE_SHEET, MARKERS)
# GEOGRAPHIC_ORIGIN
from mirri.settings import (GEOGRAPHIC_ORIGIN, ONTOBIOTOPE, LOCATIONS, GROWTH_MEDIA, GENOMIC_INFO,
STRAINS, LITERATURE_SHEET, SEXUAL_STATE_SHEET)
# MARKERS,
# SEXUAL_STATE_SHEET,
# RESOURCE_TYPES_VALUES,
# FORM_OF_SUPPLY_SHEET,
@ -64,6 +64,7 @@ STRAIN_FIELDS = [
},
{
FIELD: "Risk Group",
VALIDATION: [
{TYPE: MANDATORY, ERROR_CODE: "STD12"},
{TYPE: MISSING, ERROR_CODE: "STD13"},
@ -381,7 +382,9 @@ SHEETS_SCHEMA = {
VALIDATION: [
{TYPE: MANDATORY, ERROR_CODE: "GID04"},
{TYPE: MISSING, ERROR_CODE: "GID05"},
{TYPE: CROSSREF, CROSSREF_NAME: MARKERS, ERROR_CODE: "GID06"}
{TYPE: CHOICES, ERROR_CODE: "GID06",
VALUES: ['16S rRNA', 'ACT', 'CaM', 'EF-1α', 'ITS',
'LSU', 'RPB1', 'RPB2', 'TUBB']}
]
},
{
@ -402,7 +405,7 @@ SHEETS_SCHEMA = {
'id_field': 'Accession number',
VALIDATION: {TYPE: MANDATORY, ERROR_CODE: "EFS05"},
ROW_VALIDATION: [
{TYPE: NAGOYA, ERROR_CODE: "STD46"},
{TYPE: NAGOYA, ERROR_CODE: "STRXXX"},
],
COLUMNS: STRAIN_FIELDS,
},
@ -511,20 +514,20 @@ SHEETS_SCHEMA = {
},
]
},
MARKERS: {
"acronym": "MKD",
"id_field": "Acronym",
COLUMNS: [
{
FIELD: "Acronym",
VALIDATION: []
},
{
FIELD: "Marker",
VALIDATION: []
},
],
},
# MARKERS: {
# "acronym": "MKD",
# "id_field": "",
# COLUMNS: [
# {
# FIELD: "Acronym",
# VALIDATION: []
# },
# {
# FIELD: "Marker",
# VALIDATION: []
# },
# ],
# },
}
CROSS_REF_CONF = {
@ -533,8 +536,8 @@ CROSS_REF_CONF = {
LOCATIONS: ['Locality'],
GROWTH_MEDIA: ['Acronym'],
STRAINS: ["Accession number"],
SEXUAL_STATE_SHEET: [],
MARKERS: ["Acronym"],
SEXUAL_STATE_SHEET: []
}
MIRRI_20200601_VALLIDATION_CONF = {