Bio::EnsEMBL::Analysis::Runnable::ProteinAnnotation Coil
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
 Bio::EnsEMBL::Analysis::Runnable::ProteinAnnotation::Coil
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Analysis::Runnable::ProteinAnnotation
Bio::EnsEMBL::Utils::Exception qw ( throw warning )
Inherit
Bio::EnsEMBL::Analysis::Runnable::ProteinAnnotation
Synopsis
 my $seqstream = Bio::SeqIO->new ( -file => $queryfile,
-fmt => 'Fasta',
);
$seq = $seqstream->next_seq;
my $ncoils = Bio::EnsEMBL::Analysis::Runnable::ProteinAnnotation::Coil->new( -analysis => $ana, -query => $query); $ncoils->run; my @list = @{$ncoils->run}
Description
Methods
multiprotein
No description
Code
new
No description
Code
parse_results
No description
Code
run_analysis
No description
Code
Methods description
None available.
Methods code
multiproteindescriptionprevnextTop
sub multiprotein {
  my ($self) = @_;
  return 1;
}
newdescriptionprevnextTop
sub new {
  my ($class, @args) = @_;

  my $self = $class->SUPER::new(@args);

  if (not $self->database) {
    throw("You must supply the Coils runnable with a database directory");
  } elsif (not -d $self->database) {
    throw($self->database . " is not a *valid* database directory");
  } else {
    $ENV{'COILSDIR'} = $self->database;
  }

  return $self;
}
parse_resultsdescriptionprevnextTop
sub parse_results {
  my ($self) = @_;

  my ($fh, @pfs);

  my $resfile = $self->resultsfile;
    
  if (-e $resfile) {
    # it's a filename
if (-z $resfile) { return; } else { open($fh, "<$resfile") or throw ("Error opening $resfile"); } } else { # it'a a filehandle
$fh = $resfile; } # parse
my $seqio = Bio::SeqIO->new(-format => 'fasta', -fh => $fh); while(my $seq = $seqio->next_seq) { my $pep = $seq->seq; while ($pep =~ m/(x+)/g) {
my
$end = pos($pep);
my $start = $end - length($1) + 1; my $fp = $self->create_protein_feature($start, $end, 0, $seq->id, 0, 0, 'ncoils', $self->analysis, 0, 0); push @pfs, $fp; } } $self->output(\@pfs); } 1;
}
run_analysisdescriptionprevnextTop
sub run_analysis {
  my ($self) = @_;

  my $command = $self->program." -f < ".$self->queryfile." > ".$self->resultsfile;
  
  # run program
throw ("Error running ".$self->program." on ".$self->queryfile) unless (system($command) == 0);
}
General documentation
No general documentation available.