Bio-EnsEMBL

 view release on metacpan or  search on metacpan

lib/Bio/EnsEMBL/DBSQL/Driver/odbc.pm  view on Meta::CPAN


    return {
        dsn        => $dsn,
        username   => $conn->username(),
        password   => $conn->password(),
        attributes => {
            'LongTruncOk'     => 1,
            'LongReadLen'     => 2**16 - 8,
            'RaiseError'      => 1,
            'PrintError'      => 0,
            'odbc_cursortype' => 2,
        },
    };
}

sub from_date_to_seconds {
    my ($self, $column) = @_;
    return "DATEDIFF(second,'JAN 1 1970',$column)";
}

sub from_seconds_to_date {

lib/Bio/EnsEMBL/MicroRNA.pm  view on Meta::CPAN

=head1 SYNOPSIS

  my $miR = Bio::EnsEMBL::MicroRNA->new(
    -SEQ_START => 36,
    -SEQ_END   => 58
  );

  # Stable-ID setter
  $miR->stable_id('ENSS00090210');

  # Get start and end position in the precursor transcript
  my $start = $miR->start();
  my $end = $miR->end();

=cut


package Bio::EnsEMBL::MicroRNA;
$Bio::EnsEMBL::MicroRNA::VERSION = '113.0.0';
use vars qw($AUTOLOAD);
use strict;

lib/Bio/EnsEMBL/MicroRNA.pm  view on Meta::CPAN

use Bio::EnsEMBL::Utils::Scalar qw( assert_ref wrap_array );
use Scalar::Util qw(weaken);

use Bio::EnsEMBL::RNAProduct;

use parent qw(Bio::EnsEMBL::RNAProduct);


=head2 new

  Arg: [-ARM]         : which arm of the hairpin precursor this miRNA comes
                        from. Returns 3 and 5 for 3' and 5', respectively.
  Arg [...]           : Named arguments to superclass constructor
                        (see Bio::EnsEMBL::RNAProduct)
  Example    : my $miR = Bio::EnsEMBL::MicroRNA->new(
                 -SEQ_START => 36,
                 -SEQ_END   => 58,
                 -ARM       => 3
               );
  Description: Constructor.  Creates a new MicroRNA object
  Returntype : Bio::EnsEMBL::MicroRNA

lib/Bio/EnsEMBL/MicroRNA.pm  view on Meta::CPAN

    _validate_arm_value($arm);
  }
  $self->{'arm'} = $arm;

  return $self;
}


=head2 arm

    Arg [1]     : (optional) int $arm which arm of the hairpin precursor
                  this miRNA comes from
    Example     : $mirna_arm = $mirna->arm();
                  $mirna->arm(3);
    Description : Sets or returns the arm of the hairpin this miRNA comes
                  from. Accepted values are 3 and 5 for 3' and 5',
                  respectively.
    Return type : Integer
    Exceptions  : throw if setter is passed an incorrect value
                  or if multiple 'mirna_arm' attributes exist.
    Caller      : General

lib/Bio/EnsEMBL/MicroRNA.pm  view on Meta::CPAN

  my $self = shift;

  my $summary = SUPER::summary_as_hash();
  $summary->{'arm'} = $self->arm();

  return $summary;
}


=head2 _validate_arm_value
  Arg [1]    : int $arm which arm of the hairpin precursor this miRNA
               comes from
  Description: PRIVATE validates if its argument has one of the accepted
               values for specifying the miRNA hairpin arm.
  Returntype : none
  Exceptions : throw if the argument is out of bounds
  Caller     : internal
  Status     : Stable

=cut

lib/Bio/EnsEMBL/RNAProduct.pm  view on Meta::CPAN

=head1 SYNOPSIS

  my $rnaproduct = Bio::EnsEMBL::RNAProduct->new(
    -SEQ_START => 36,
    -SEQ_END   => 58
  );

  # Stable-ID setter
  $rnaproduct->stable_id('ENSS00090210');

  # Get start and end position in the precursor transcript
  my $start = $rnaproduct->start();
  my $end = $rnaproduct->end();

=cut


package Bio::EnsEMBL::RNAProduct;
$Bio::EnsEMBL::RNAProduct::VERSION = '113.0.0';
use vars qw($AUTOLOAD);
use strict;

lib/Bio/EnsEMBL/RNAProduct.pm  view on Meta::CPAN

  my $self = shift;
  return $self->stable_id() || $self->dbID() || '';
}


=head2 end

  Arg [1]    : (optional) int $end - end position to set
  Example    : $rnaproduct->end(39);
  Description: Getter/setter for the value of end, which is a position within
               the precursor Transcript.
  Returntype : int
  Exceptions : none
  Caller     : general
  Status     : Stable

=cut

sub end {
  my $self = shift;
  if ( @_ ) {

lib/Bio/EnsEMBL/RNAProduct.pm  view on Meta::CPAN


  return $self->{stable_id} . ($self->{version} ? ".$self->{version}" : '');
}


=head2 start

  Arg [1]    : (optional) int $start - start position to set
  Example    : $rnaproduct->start(17);
  Description: Getter/setter for the value of start, which is a position within
               the precursor Transcript.
  Returntype : int
  Exceptions : none
  Caller     : general
  Status     : Stable

=cut

sub start {
  my $self = shift;
  if ( @_ ) {



( run in 0.462 second using v1.01-cache-2.11-cpan-4d50c553e7e )