<commit_before>#
# You may distribute this module under the same terms as perl itself
#
# POD documentation - main docs before the code

=pod 

=head1 NAME

Bio::EnsEMBL::Pipeline::Runnable::Est2Genome

=head1 SYNOPSIS

    my $obj = Bio::EnsEMBL::Pipeline::Runnable::Est2Genome->new(
                                             -genomic => $genseq,
                                             -est     => $estseq 
                                             );
    or
    
    my $obj = Bio::EnsEMBL::Pipeline::Runnable::Est2Genome->new()

=head1 DESCRIPTION

Object to store the details of an est2genome run.
Stores the est2genome matches as an array of Bio::EnsEMBL::FeaturePair

=head2 Methods:

 new,
 genomic_sequence,
 est_sequence,
 run,
 output.

=head1 CONTACT

Describe contact details here

=head1 APPENDIX

The rest of the documentation details each of the object methods. 
Internal methods are usually preceded with a _

=cut

# Let the code begin...

package Bio::EnsEMBL::Pipeline::Runnable::Est2Genome;

use vars qw(@ISA);
use strict;
# Object preamble

use Bio::EnsEMBL::Pipeline::RunnableI;
use Bio::EnsEMBL::FeaturePair;
use Bio::EnsEMBL::SeqFeature;
use Bio::EnsEMBL::Analysis;
#compile time check for executable
use Bio::EnsEMBL::Analysis::Programs qw(est_genome); 
use Bio::PrimarySeq;
use Bio::SeqIO;
use Bio::EnsEMBL::Root;

#use Data::Dumper;

@ISA = qw(Bio::EnsEMBL::Pipeline::RunnableI);

=head2 new

    Title   :   new
    Usage   :   $self->new(-GENOMIC       => $genomicseq,
													 -EST           => $estseq,
                           -E2G           => $executable,
                           -ARGS          => $args);
                           
    Function:   creates a 
                Bio::EnsEMBL::Pipeline::Runnable::Est2Genome object
    Returns :   A Bio::EnsEMBL::Pipeline::Runnable::Est2Genome object
    Args    :   -genomic:    Bio::PrimarySeqI object (genomic sequence)
                -est:        Bio::PrimarySeqI object (est sequence), 
                -e2g:        Path to Est2Genome executable
                -args:       Arguments when running est2genome 
=cut

sub new {
    my ($class,@args) = @_;
    my $self = $class->SUPER::new(@args);
           
    $self->{'_fplist'}     = [];    # create key to an array of feature pairs
    $self->{'_clone'}      = undef; # location of Bio::Seq object
    $self->{'_est_genome'} = undef; # location of est2genome
    $self->{'_workdir'}    = undef; # location of temp directory
    $self->{'_filename'}   = undef; # file to store Bio::Seq object
    $self->{'_estfilename'}= undef; # file to store EST Bio::Seq object
    $self->{'_results'}    = undef; # file to store results of analysis
    $self->{'_protected'}  = [];    # a list of files protected from deletion
    $self->{'_arguments'}  = undef; # arguments for est2genome
    
    my( $genomic, $est, $est_genome, $arguments ) =   $self->_rearrange([qw(GENOMIC EST E2G ARGS)], @args);

	 $self->genomic_sequence($genomic) if $genomic; 
	 $self->est_sequence    ($est)     if $est; 
	 
	 print "est display_id: ".$est->display_id." accession_number: ".$est->accession_number."\n";
	 
	 if ($est_genome) {   
	   $self->est_genome($est_genome) ;
	 } else  {   
	   eval 
	     { $self->est_genome($self->locate_executable('est2genome')); };<commit_msg>est2genome is installed not est_genome<commit_after>#
# You may distribute this module under the same terms as perl itself
#
# POD documentation - main docs before the code

=pod 

=head1 NAME

Bio::EnsEMBL::Pipeline::Runnable::Est2Genome

=head1 SYNOPSIS

    my $obj = Bio::EnsEMBL::Pipeline::Runnable::Est2Genome->new(
                                             -genomic => $genseq,
                                             -est     => $estseq 
                                             );
    or
    
    my $obj = Bio::EnsEMBL::Pipeline::Runnable::Est2Genome->new()

=head1 DESCRIPTION

Object to store the details of an est2genome run.
Stores the est2genome matches as an array of Bio::EnsEMBL::FeaturePair

=head2 Methods:

 new,
 genomic_sequence,
 est_sequence,
 run,
 output.

=head1 CONTACT

Describe contact details here

=head1 APPENDIX

The rest of the documentation details each of the object methods. 
Internal methods are usually preceded with a _

=cut

# Let the code begin...

package Bio::EnsEMBL::Pipeline::Runnable::Est2Genome;

use vars qw(@ISA);
use strict;
# Object preamble

use Bio::EnsEMBL::Pipeline::RunnableI;
use Bio::EnsEMBL::FeaturePair;
use Bio::EnsEMBL::SeqFeature;
use Bio::EnsEMBL::Analysis;
#compile time check for executable
use Bio::EnsEMBL::Analysis::Programs qw(est2genome); 

use Bio::PrimarySeq;
use Bio::SeqIO;
use Bio::EnsEMBL::Root;

#use Data::Dumper;

@ISA = qw(Bio::EnsEMBL::Pipeline::RunnableI);

=head2 new

    Title   :   new
    Usage   :   $self->new(-GENOMIC       => $genomicseq,
													 -EST           => $estseq,
                           -E2G           => $executable,
                           -ARGS          => $args);
                           
    Function:   creates a 
                Bio::EnsEMBL::Pipeline::Runnable::Est2Genome object
    Returns :   A Bio::EnsEMBL::Pipeline::Runnable::Est2Genome object
    Args    :   -genomic:    Bio::PrimarySeqI object (genomic sequence)
                -est:        Bio::PrimarySeqI object (est sequence), 
                -e2g:        Path to Est2Genome executable
                -args:       Arguments when running est2genome 
=cut

sub new {
    my ($class,@args) = @_;
    my $self = $class->SUPER::new(@args);
           
    $self->{'_fplist'}     = [];    # create key to an array of feature pairs
    $self->{'_clone'}      = undef; # location of Bio::Seq object
    $self->{'_est_genome'} = undef; # location of est2genome
    $self->{'_workdir'}    = undef; # location of temp directory
    $self->{'_filename'}   = undef; # file to store Bio::Seq object
    $self->{'_estfilename'}= undef; # file to store EST Bio::Seq object
    $self->{'_results'}    = undef; # file to store results of analysis
    $self->{'_protected'}  = [];    # a list of files protected from deletion
    $self->{'_arguments'}  = undef; # arguments for est2genome
    
    my( $genomic, $est, $est_genome, $arguments ) =   $self->_rearrange([qw(GENOMIC EST E2G ARGS)], @args);

	 $self->genomic_sequence($genomic) if $genomic; 
	 $self->est_sequence    ($est)     if $est; 
	 
	 print "est display_id: ".$est->display_id." accession_number: ".$est->accession_number."\n";
	 
	 if ($est_genome) {   
	   $self->est_genome($est_genome) ;
	 } else  {   
	   eval 
	     { $self->est_genome($self->locate_executable('est2genome')); };
	   $self->throw("Can't find executable") if $@;
{'fraction_non_alphanumeric': 0.12766274392968865, 'fraction_numerical': 0.007150305377625503, 'mean_word_length': 2.496875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 58, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1365213', 'n_tokens_mistral': 2289, 'n_tokens_neox': 2075, 'n_words': 552}