Skip to content
Snippets Groups Projects
Verified Commit b06b9c6d authored by Stefano Giorgetti's avatar Stefano Giorgetti
Browse files

Revert regulatory summary and filter EMARs

parent 56bd8594
No related branches found
No related tags found
No related merge requests found
......@@ -160,15 +160,7 @@ sub to_hash {
my ($self, $features, $feature_type) = @_;
my @hashed;
foreach my $feature (@{$features}) {
my $hash;
if (lc($feature_type) eq 'regulatory') {
$hash = $feature->summary_as_hash_2();
} else {
$hash = $feature->summary_as_hash();
}
my $hash = $feature->summary_as_hash();
foreach my $key (@KNOWN_NUMERICS) {
my $v = $hash->{$key};
$hash->{$key} = ($v*1) if defined $v;
......@@ -189,6 +181,9 @@ sub to_hash {
$hash->{description} = $feature->{$feature_type}->{hdescription} if defined($feature->{$feature_type}->{hdescription});
}
}
if (lc($feature_type) eq 'regulatory') {
next if ($hash->{description} eq 'Epigenetically modified accessible region');
}
push(@hashed, $hash);
}
return \@hashed;
......
......@@ -304,13 +304,13 @@ my $base = '/overlap/region/homo_sapiens';
my $region = '1:76429380..76430144';
cmp_deeply(json_GET("$base/$region?feature=regulatory", 'Get regulatory_feature'), [{
id => 'ENSR00000105157',
extended_end => 76430144,
extended_start => 76429380,
description => 'open_chromatin_region',
bound_end => 76430144,
bound_start => 76429380,
description => 'Open chromatin region',
end => 76430144,
feature_type => 'regulatory',
seq_region_name => 1,
source => 'Ensembl',
source => 'Regulatory_Build',
start => 76429380,
strand => 0
}], 'Getting regulatory_feature as JSON');
......
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