Commit 094d33bc authored by Keith Jolley's avatar Keith Jolley

Add status field to classification schemes.

parent 8e1effe0
...@@ -527,19 +527,19 @@ sub _get_classification_group_data { ...@@ -527,19 +527,19 @@ sub _get_classification_group_data {
: q(); : q();
my $plural = $cscheme->{'inclusion_threshold'} == 1 ? q() : q(es); my $plural = $cscheme->{'inclusion_threshold'} == 1 ? q() : q(es);
$buffer .= qq(<tr class="td$td"><td>$cscheme->{'name'}$tooltip</td><td>$scheme_info->{'description'}</td>) $buffer .= qq(<tr class="td$td"><td>$cscheme->{'name'}$tooltip</td><td>$scheme_info->{'description'}</td>)
. qq(<td>Single-linkage</td><td>$cscheme->{'inclusion_threshold'}</td><td>$cg_buffer</td></tr>); . qq(<td>Single-linkage</td><td>$cscheme->{'inclusion_threshold'}</td><td>$cscheme->{'status'}</td><td>)
. qq($cg_buffer</td></tr>);
$td = $td == 1 ? 2 : 1; $td = $td == 1 ? 2 : 1;
} }
} }
if ($buffer) { if ($buffer) {
$buffer = $buffer =
q(<h2>Similar isolates (determined by classification schemes)</h2>) q(<h2>Similar isolates (determined by classification schemes)</h2>)
. q(<p>Please note that group numbers are subject to change and are not a stable part ) . q(<p>Experimental schemes are subject to change and are not a stable part of the nomenclature.</p>)
. q(of the nomenclature.</p>)
. q(<div class="scrollable">) . q(<div class="scrollable">)
. q(<div class="resultstable" style="float:left"><table class="resultstable"><tr>) . q(<div class="resultstable" style="float:left"><table class="resultstable"><tr>)
. q(<th>Classification scheme</th><th>Underlying scheme</th><th>Clustering method</th>) . q(<th>Classification scheme</th><th>Underlying scheme</th><th>Clustering method</th>)
. qq(<th>Mismatch threshold</th><th>Group</th></tr>$buffer</table></div></div>); . qq(<th>Mismatch threshold</th><th>Status</th><th>Group</th></tr>$buffer</table></div></div>);
} }
return $buffer; return $buffer;
} }
......
...@@ -1961,7 +1961,8 @@ sub get_classification_schemes_table_attributes { ...@@ -1961,7 +1961,8 @@ sub get_classification_schemes_table_attributes {
} }
]; ];
if ( $self->{'system'}->{'dbtype'} eq 'isolates' ) { if ( $self->{'system'}->{'dbtype'} eq 'isolates' ) {
push @$attributes, ( push @$attributes,
(
{ {
name => 'seqdef_cscheme_id', name => 'seqdef_cscheme_id',
type => 'int', type => 'int',
...@@ -1969,17 +1970,20 @@ sub get_classification_schemes_table_attributes { ...@@ -1969,17 +1970,20 @@ sub get_classification_schemes_table_attributes {
tooltip => tooltip =>
'seqdef_cscheme_id - The id used in the isolate database will be used if this is not defined.' 'seqdef_cscheme_id - The id used in the isolate database will be used if this is not defined.'
}, },
{ { name => 'display_order', type => 'int' }
name => 'display_order', );
type => 'int'
}
);
} }
push @$attributes, push @$attributes, (
( {
name => 'status',
type => 'text',
required => 'yes',
optlist => 'experimental;stable',
default => 'experimental'
},
{ name => 'curator', type => 'int', required => 'yes', dropdown_query => 'yes' }, { name => 'curator', type => 'int', required => 'yes', dropdown_query => 'yes' },
{ name => 'datestamp', type => 'date', required => 'yes' } { name => 'datestamp', type => 'date', required => 'yes' }
); );
return $attributes; return $attributes;
} }
......
...@@ -1252,6 +1252,7 @@ inclusion_threshold int NOT NULL, ...@@ -1252,6 +1252,7 @@ inclusion_threshold int NOT NULL,
use_relative_threshold boolean NOT NULL, use_relative_threshold boolean NOT NULL,
seqdef_cscheme_id int, seqdef_cscheme_id int,
display_order int, display_order int,
status text NOT NULL,
curator int NOT NULL, curator int NOT NULL,
datestamp date NOT NULL, datestamp date NOT NULL,
PRIMARY KEY(id), PRIMARY KEY(id),
......
...@@ -1254,6 +1254,7 @@ name text NOT NULL, ...@@ -1254,6 +1254,7 @@ name text NOT NULL,
description text, description text,
inclusion_threshold int NOT NULL, inclusion_threshold int NOT NULL,
use_relative_threshold boolean NOT NULL, use_relative_threshold boolean NOT NULL,
status text NOT NULL,
curator int NOT NULL, curator int NOT NULL,
datestamp date NOT NULL, datestamp date NOT NULL,
PRIMARY KEY(id), PRIMARY KEY(id),
......
...@@ -243,6 +243,7 @@ inclusion_threshold int NOT NULL, ...@@ -243,6 +243,7 @@ inclusion_threshold int NOT NULL,
use_relative_threshold boolean NOT NULL, use_relative_threshold boolean NOT NULL,
seqdef_cscheme_id int, seqdef_cscheme_id int,
display_order int, display_order int,
status text NOT NULL,
curator int NOT NULL, curator int NOT NULL,
datestamp date NOT NULL, datestamp date NOT NULL,
PRIMARY KEY(id), PRIMARY KEY(id),
......
...@@ -284,6 +284,7 @@ name text NOT NULL, ...@@ -284,6 +284,7 @@ name text NOT NULL,
description text, description text,
inclusion_threshold int NOT NULL, inclusion_threshold int NOT NULL,
use_relative_threshold boolean NOT NULL, use_relative_threshold boolean NOT NULL,
status text NOT NULL,
curator int NOT NULL, curator int NOT NULL,
datestamp date NOT NULL, datestamp date NOT NULL,
PRIMARY KEY(id), PRIMARY KEY(id),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment