Bio::EnsEMBL::Analysis::Tools
MiniSeq
Toolbar
Summary
MiniSeq - an artificially constructed cDNA on a genomic sequence
Package variables
No package variables defined.
Included modules
Inherit
Synopsis
This module is used when we only want to run an analysis over
a part or multiple parts of a sequence.
Description
Contains details of coordinates of all exons that make
up a gene transcript.
Creation:
my $mini = new
Bio::EnsEMBL::Analysis::Tools::MiniSeq(-id => $id,
-pairaln => $pairaln);
$pairaln is a Bio::EnsEMBL::Analysis::PairAlign object containing
one or more feature pairs that represent the mapping of
the genomic coords to the cDNA coords
Manipulation:
my $align = $mini->get_PairAlign;
my $cdnaseq = $mini->get_cDNA_sequence;
# We now do some analysis on the cdnaseq that puts sequence
# features on it. We don't want the coordsin the cDNA frame so
# we now pass them back to the miniseq to convert them into
# genomic coordinates.
my @newfeatures = $mini->convert_FeaturePairs(@featurepairs);
Methods
Methods description
Title : convert_FeaturePair Usage : my @newfeatures = $self->convert_FeaturePairs($feature) Function: Converts feature pair coordinates on the cDNA sequence into an array of feature pairs on the genomic sequence Example : Returns : Bio::EnsEMBL::FeaturePair Args : Array of Bio::EnsEMBL::FeaturePair |
Title : convert_PepFeaturePair Usage : my @newfeatures = $self->convert_PepFeaturePair($feature) Function: Converts feature pair coordinates on the cDNA sequence into an array of feature pairs on the genomic sequence Peptide coordinates are maintained. Example : Returns : Array of Bio::EnsEMBL::FeaturePair Args : Bio::EnsEMBL::FeaturePair |
Title : convert_FeaturePair Usage : my @newfeatures = $self->convert_FeaturePairs($feature) Function: Converts feature coordinates on the cDNA sequence into an array of features on the genomic sequence Example : Returns : Bio::EnsEMBL::FeaturePair Args : Array of Bio::EnsEMBL::FeaturePair |
Title : get_cDNA_sequence Usage : my $seq = $self->get_cDNA_sequence Function: Returns the cdna sequence corresponding to the cDNA in the pairAlign object Example : Returns : Bio::PrimarySeq Args : none |
Title : id Usage : $obj->id($newval) Function: Returns : value of id Args : newvalue (optional) |
Title : pairAlign Usage : $self->pairAlign($pair) Function: Get/set method for the pairalign object that stores the cDNA-genomic exon mapping Returns : Bio::EnsEMBL::Analysis::PairAlign Args : |
Methods code
sub convert_FeaturePair
{ my ($self,$feature) = @_;
my @newfeatures;
my @tmp = @{$self->pairAlign->convert_FeaturePair($feature)};
push(@newfeatures,@tmp);
return\@ newfeatures; } |
sub convert_PepFeaturePair
{ my ($self,$feature) = @_;
my @newfeatures;
my @tmp = @{$self->pairAlign->convert_FeaturePair($feature)};
$tmp[0]->hstart($feature->hstart);
$tmp[0]->hend($feature->hend);
$tmp[0]->hstrand(1);
push(@newfeatures,@tmp);
return\@ newfeatures;
}
1; } |
sub convert_SeqFeature
{ my ($self,$feature) = @_;
my @newfeatures;
my @tmp = @{$self->pairAlign->convert_cDNA_feature($feature)};
push(@newfeatures,@tmp);
return\@ newfeatures; } |
sub get_cDNA_sequence
{ my ($self) = @_;
my $seqstr = "";
my @exons = @{$self->pairAlign->eachFeaturePair};
return unless (scalar @exons > 0);
foreach my $exon (@exons) {
$seqstr .= $exon->seq;
}
return new Bio::PrimarySeq('-id' => "genomic" ,
-seq => $seqstr); } |
sub id
{ my ($self,$arg) = @_;
if(defined($arg)) {
$self->{'_id'} = $arg;
}
return $self->{'_id'}; } |
sub new
{ my($class,@args) = @_;
my $self = {};
bless $self, $class;
my ($id,$pairalign) = rearrange([qw(ID PAIRALIGN)],@args);
verbose('warning');
$self->id($id);
$self->pairAlign($pairalign);
throw("No input id for MiniSeq") unless($self->id);
throw("No input pairalign for MiniSeq") unless($self->pairAlign);
return $self; } |
sub pairAlign
{ my ($self,$pair) = @_;
if ($pair) {
if( ! $pair->isa("Bio::EnsEMBL::Analysis::Tools::PairAlign") ) {
throw("$pair is not a Bio::EnsEMBL::Analysis::Tools::PairAlign!");
}
foreach my $p (@{$pair->eachFeaturePair}) {
if ($p->strand != 1) {
throw("Can't have a PairAlign object where the strand of the first ".
"object is reversed");
}
}
$self->{'_pair'} = $pair;
}
return $self->{'_pair'}; } |
General documentation
Describe contact details here
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _