Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:MG-RAST/MG-RAST into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredbischof committed Jan 8, 2013
2 parents 69c7a97 + 0e44334 commit 624bce6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/MGRAST/lib/resources2/abundanceprofile.pm
Expand Up @@ -114,7 +114,7 @@ sub instance {
$job = $job->[0];

# check rights
unless ($job->{public} || exists($self->rights->{$id})) {
unless ($job->{public} || exists($self->rights->{$id}) || ($self->user && $self->user->has_right(undef, 'view', 'metagenome', '*'))) {
$self->return_data( {"ERROR" => "insufficient permissions to view this data"}, 401 );
}

Expand Down
4 changes: 2 additions & 2 deletions src/MGRAST/lib/resources2/m5nr.pm
Expand Up @@ -142,7 +142,7 @@ sub static {
$self->return_data({"ERROR" => "invalid min_level for m5nr/ontology: ".$min_lvl." - valid types are [".join(", ", @ont_hier)."]"}, 500);
}
if ($pname && ($min_lvl ne 'level1')) {
@$data = $mgdb->get_hierarchy_slice('ontology', $source, $pname, $min_lvl);
$data = $mgdb->get_hierarchy_slice('ontology', $source, $pname, $min_lvl);
} else {
@$data = values %{ $mgdb->get_hierarchy('ontology', $source, undef, undef, $min_lvl) };
}
Expand All @@ -155,7 +155,7 @@ sub static {
$self->return_data({"ERROR" => "invalid min_level for m5nr/taxonomy: ".$min_lvl." - valid types are [".join(", ", @tax_hier)."]"}, 500);
}
if ($pname && ($min_lvl ne 'tax_domain')) {
@$data = $mgdb->get_hierarchy_slice('organism', undef, $pname, $min_lvl);
$data = $mgdb->get_hierarchy_slice('organism', undef, $pname, $min_lvl);
} else {
@$data = values %{ $mgdb->get_hierarchy('organism', undef, undef, undef, $min_lvl) };
}
Expand Down
2 changes: 1 addition & 1 deletion src/MGRAST/lib/resources2/matrix.pm
Expand Up @@ -340,7 +340,7 @@ sub prepare_data {
push @$brows, { id => $rid, metadata => $rmd };
}
my $mddb = MGRAST::Metadata->new();
my $meta = $mddb->get_jobs_metadata_fast([keys %$col_ids], 1);
my $meta = $mddb->get_jobs_metadata_fast($data, 1);
my $name = $mgdb->_name_map();
foreach my $cid (sort {$col_ids->{$a} <=> $col_ids->{$b}} keys %$col_ids) {
my $cmd = exists($meta->{$cid}) ? $meta->{$cid} : undef;
Expand Down
12 changes: 6 additions & 6 deletions src/MGRAST/lib/resources2/metagenome.pm
Expand Up @@ -23,12 +23,12 @@ sub new {
"library" => [ 'reference library', 'reference to the related library object' ],
"sample" => [ 'reference sample', 'reference to the related sample object' ],
"project" => [ 'reference project', 'reference to the project object' ],
"metadata" => [ 'hash', 'key value pairs describing metadata' ],
"created" => [ 'date', 'time the object was first created' ],
"metadata" => [ 'hash', 'key value pairs describing metadata' ],
"created" => [ 'date', 'time the object was first created' ],
"version" => [ 'integer', 'version of the object' ],
"url" => [ 'uri', 'resource location of this object instance' ],
"status" => ['cv', [['public', 'object is public'],
['private', 'object is private']]],
"url" => [ 'uri', 'resource location of this object instance' ],
"status" => [ 'cv', [ ['public', 'object is public'],
['private', 'object is private'] ] ],
"sequence_type" => [ 'string', 'sequencing type' ]
};
return $self;
Expand Down Expand Up @@ -119,7 +119,7 @@ sub instance {
$job = $job->[0];

# check rights
unless ($job->{public} || exists($self->rights->{$id})) {
unless ($job->{public} || exists($self->rights->{$id}) || ($self->user && $self->user->has_right(undef, 'view', 'metagenome', '*'))) {
$self->return_data( {"ERROR" => "insufficient permissions to view this data"}, 401 );
}

Expand Down

0 comments on commit 624bce6

Please sign in to comment.