Bio::EnsEMBL::Analysis::Runnable::ProteinAnnotation
Superfamily
Toolbar
Summary
Bio::EnsEMBL::Analysis::Runnable::Protein::Hmmpfam
Package variables
No package variables defined.
Included modules
Inherit
Synopsis
# something like this
my $query = new Bio::Seq(-file => $queryfile,
-format => 'Fasta');
my $hmm = Bio::EnsEMBL::Pipeline::Runnable::ProteinAnnotation::Superfamily->new
('-query' => $query,
'-program' => 'hmmpfam' or '/usr/local/pubseq/bin/hmmpfam',
'-database' => '/superfamily/db');
$hmm->run;
my @results = @{$hmm->output};
Description
Methods
evalue_cutoff | No description | Code |
new | No description | Code |
output | No description | Code |
parse_results | No description | Code |
scop_map | No description | Code |
Methods description
None available.
Methods code
evalue_cutoff | description | prev | next | Top |
sub evalue_cutoff
{ my ($self, $val) = @_;
if (defined $val) {
$self->{_evalue_cutoff} = $val;
}
if (not exists $self->{_evalue_cutoff}) {
return undef;
} else {
return $self->{_evalue_cutoff};
}
}
1; } |
sub new
{ my ($class, @args) = @_;
my $self = $class->SUPER::new(@args);
my ($scop_map_file,
$evalue) = rearrange(['SCOPMAP',
'EVALUE',
], @args);
$self->scop_map($scop_map_file)
if defined $scop_map_file;
if (defined $evalue) {
$self->evalue_cutoff($evalue);
} else {
warning("No evalue cutoff given; defaulting to 0.02");
$self->evalue_cutoff("0.02");
}
my $opts = defined($self->options) ? $self->options : "";
$opts =~ s/\-E\s+\S+//;
$self->options("$opts -E " . $self->evalue_cutoff);
return $self; } |
sub output
{ my ($self, $output) = @_;
if (defined $output) {
throw("Must pass Runnable:output an arrayref not a ".$output)
unless(ref($output) eq 'ARRAY');
$self->{output} = $output;
}
if (not exists $self->{output}) {
$self->{output} = [];
}
return $self->{output}; } |
sub parse_results
{ my ($self) = @_;
$self->SUPER::parse_results;
my @pass_eval;
foreach my $hit (@{$self->output}) {
if (not defined $self->evalue_cutoff or
$hit->p_value <= $self->evalue_cutoff) {
push @pass_eval, $hit;
}
}
my $filter = Bio::EnsEMBL::Analysis::Tools::ProteinAnnotationFilter->new();
my $out = $filter->filter_results(\@pass_eval);
if ($self->scop_map) {
foreach my $hit (@$out) {
if (exists($self->scop_map->{$hit->hseqname})) {
my $scopname = $self->scop_map->{$hit->hseqname};
$hit->hseqname( $scopname );
}
}
}
$self->output($out); } |
sub scop_map
{ my ($self, $file) = @_;
my %scop_map;
if (defined $file) {
open SCOPMAP, $file or throw("Could not open SCOP mapfile '$file'");
while(<SCOPMAP>) {
/^(\S+)\s+(\S+)/ and $scop_map{$1} = $2;
}
close(SCOPMAP);
$self->{_scop_map} =\% scop_map;
}
return $self->{_scop_map}; } |
General documentation