Skip to content

Commit 8bf894b

Browse files
kansgouriano
authored andcommitted
JIRA:RW-2387 Added support for eErr_SEQ_DESCR_BadContigOrScaffoldChromosome
git-svn-id: https://anonsvn.ncbi.nlm.nih.gov/repos/v1/trunk/c++@103509 78c7ea69-d796-4a43-9a09-de51944f1b03
1 parent 40f52f6 commit 8bf894b

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

include/objects/valerr/ValidErrItem.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ enum EErrType {
365365
eErr_SEQ_DESCR_BadNullCountry,
366366
eErr_SEQ_DESCR_BadNullCollectionDate,
367367
eErr_SEQ_DESCR_UnculturedGenome,
368+
eErr_SEQ_DESCR_BadContigOrScaffoldChromosome,
368369
ERR_CODE_END(SEQ_DESCR),
369370

370371

src/objects/valerr/ValidErrItem.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,6 +1013,9 @@ static const TErrTypStrs sc_ErrStrs[] = {
10131013
{ eErr_SEQ_DESCR_UnculturedGenome,
10141014
{ "UnculturedGenome",
10151015
"A genomic sequence should not have uncultured in its organism name"} },
1016+
{ eErr_SEQ_DESCR_BadContigOrScaffoldChromosome,
1017+
{ "BadContigOrScaffoldChromosome",
1018+
"Chromosome name should not contain contig or scaffold" }},
10161019

10171020

10181021
/* SEQ_GENERIC */

src/objtools/validator/valid_biosource.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,6 +1480,10 @@ const bool isInfluenzaOrSars2)
14801480
"Problematic plasmid/chromosome/linkage group name '" + sname + "'",
14811481
obj, ctx);
14821482
}
1483+
if (NStr::FindNoCase(sname, "contig") != string::npos || NStr::FindNoCase(sname, "scaffold") != string::npos)
1484+
PostObjErr(eDiag_Error, eErr_SEQ_DESCR_BadContigOrScaffoldChromosome,
1485+
"Chromosome should not include contig or scaffold: '" + sname + "'",
1486+
obj, ctx);
14831487
break;
14841488
case CSubSource::eSubtype_linkage_group:
14851489
if (!CSubSource::IsLinkageGroupNameValid(sname, taxname)) {

0 commit comments

Comments
 (0)