Bio-KBase
view release on metacpan or search on metacpan
lib/Bio/KBase/CDMI/Client.pm view on Meta::CPAN
}
}
=head2 $result = get_relationship_IsInstanceOf(ids, from_fields, rel_fields, to_fields)
=cut
sub get_relationship_IsInstanceOf
{
my($self, @args) = @_;
if ((my $n = @args) != 4)
{
Bio::KBase::Exceptions::ArgumentValidationError->throw(error =>
"Invalid argument count for function get_relationship_IsInstanceOf (received $n, expecting 4)");
}
{
my($ids, $from_fields, $rel_fields, $to_fields) = @args;
my @_bad_arguments;
(ref($ids) eq 'ARRAY') or push(@_bad_arguments, "Invalid type for argument 1 \"ids\" (value was \"$ids\")");
(ref($from_fields) eq 'ARRAY') or push(@_bad_arguments, "Invalid type for argument 2 \"from_fields\" (value was \"$from_fields\")");
(ref($rel_fields) eq 'ARRAY') or push(@_bad_arguments, "Invalid type for argument 3 \"rel_fields\" (value was \"$rel_fields\")");
(ref($to_fields) eq 'ARRAY') or push(@_bad_arguments, "Invalid type for argument 4 \"to_fields\" (value was \"$to_fields\")");
if (@_bad_arguments) {
my $msg = "Invalid arguments passed to get_relationship_IsInstanceOf:\n" . join("", map { "\t$_\n" } @_bad_arguments);
Bio::KBase::Exceptions::ArgumentValidationError->throw(error => $msg,
method_name => 'get_relationship_IsInstanceOf');
}
}
my $result = $self->{client}->call($self->{url}, {
method => "CDMI_EntityAPI.get_relationship_IsInstanceOf",
params => \@args,
});
if ($result) {
if ($result->is_error) {
Bio::KBase::Exceptions::JSONRPC->throw(error => $result->error_message,
code => $result->content->{code},
method_name => 'get_relationship_IsInstanceOf',
);
} else {
return wantarray ? @{$result->result} : $result->result->[0];
}
} else {
Bio::KBase::Exceptions::HTTP->throw(error => "Error invoking method get_relationship_IsInstanceOf",
status_line => $self->{client}->status_line,
method_name => 'get_relationship_IsInstanceOf',
);
}
}
=head2 $result = get_relationship_IsLocatedIn(ids, from_fields, rel_fields, to_fields)
A feature is a set of DNA sequence fragments. Most features
are a single contiquous fragment, so they are located in only one
DNA sequence; however, fragments have a maximum length, so even a
single contiguous feature may participate in this relationship
multiple times. A few features belong to multiple DNA sequences. In
that case, however, all the DNA sequences belong to the same genome.
A DNA sequence itself will frequently have thousands of features
connected to it.
It has the following fields:
=over 4
=item ordinal
Sequence number of this segment, starting from 1
and proceeding sequentially forward from there.
=item begin
Index (1-based) of the first residue in the contig
that belongs to the segment.
=item len
Length of this segment.
=item dir
Direction (strand) of the segment: "+" if it is
forward and "-" if it is backward.
=back
=cut
sub get_relationship_IsLocatedIn
{
my($self, @args) = @_;
if ((my $n = @args) != 4)
{
Bio::KBase::Exceptions::ArgumentValidationError->throw(error =>
"Invalid argument count for function get_relationship_IsLocatedIn (received $n, expecting 4)");
}
{
my($ids, $from_fields, $rel_fields, $to_fields) = @args;
my @_bad_arguments;
(ref($ids) eq 'ARRAY') or push(@_bad_arguments, "Invalid type for argument 1 \"ids\" (value was \"$ids\")");
(ref($from_fields) eq 'ARRAY') or push(@_bad_arguments, "Invalid type for argument 2 \"from_fields\" (value was \"$from_fields\")");
(ref($rel_fields) eq 'ARRAY') or push(@_bad_arguments, "Invalid type for argument 3 \"rel_fields\" (value was \"$rel_fields\")");
(ref($to_fields) eq 'ARRAY') or push(@_bad_arguments, "Invalid type for argument 4 \"to_fields\" (value was \"$to_fields\")");
if (@_bad_arguments) {
my $msg = "Invalid arguments passed to get_relationship_IsLocatedIn:\n" . join("", map { "\t$_\n" } @_bad_arguments);
Bio::KBase::Exceptions::ArgumentValidationError->throw(error => $msg,
method_name => 'get_relationship_IsLocatedIn');
}
( run in 0.997 second using v1.01-cache-2.11-cpan-364913b4093 )