Skip to content
Snippets Groups Projects
Commit e288c7dd authored by Andy Yates's avatar Andy Yates
Browse files

[ENSCORESW-335]. Allowed the input param force_species to populate species....

[ENSCORESW-335]. Allowed the input param force_species to populate species. Does using a hash. Higher up the levels we use a hash map plus decoding aliases so no need to worry about clashes between common and scientific names
parent df2fd8e4
No related branches found
No related tags found
No related merge requests found
......@@ -76,6 +76,7 @@ sub param_defaults {
sub fetch_input {
my ($self) = @_;
$self->_add_force_species_to_species();
$self->SUPER::fetch_input();
$self->throw("Need to define a release parameter") unless $self->param('release');
......@@ -90,6 +91,16 @@ sub fetch_input {
return;
}
#Allows a user to use '-force_species human' rather than '-force_species human -species human'
sub _add_force_species_to_species {
my ($self) = @_;
my $force_species = $self->param('force_species');
my $species = $self->param('species');
my %final_species = map { $_ => 1 } (@{$force_species}, @{$species});
$self->param('species', [keys %final_species]);
return;
}
sub dna_flow {
my ($self, $dba) = @_;
my $parent_flow = $self->SUPER::dna_flow($dba);
......
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