Skip to content
Snippets Groups Projects
Commit c46ab03d authored by Leo Gordon's avatar Leo Gordon
Browse files

-analyses_pattern now supports merging multiple subpatterns together, and ensures uniqueness

parent 94bb150f
No related branches found
No related tags found
No related merge requests found
......@@ -113,6 +113,18 @@ sub fetch_all_by_pattern {
$analyses = $self->fetch_all();
} elsif( $pattern=~/,/ ) { # make sure we don't get any repeats as a result of joining
my %uniq = ();
foreach my $subpattern (split(/,/, $pattern)) {
foreach my $analysis (@{ $self->fetch_all_by_pattern( $subpattern ) }) {
$uniq{$analysis->dbID} = $analysis;
}
}
$analyses = [ values %uniq ];
} elsif( $pattern=~/^\d+$/ ) {
$analyses = $self->fetch_all_by_analysis_id( $pattern );
......
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