Inheritance diagram for Bio::EnsEMBL::Compara::AlignedMemberSet:Class Summary
Description
AlignedMemberSet is a specialized version of MemberSet for members that have a sequence and that are aligned (i.e. AlignedMember). It is the actual base class for Family, Homology and GeneTree. It only adds methods to deal with the alignment. Since SeqMember can hold several sequences per member (seq_type), AlignedMemberSet can also do so. An AlignedMemberSet defaults on a given seq_type, but can also be mapped to another one. For instance, the alignments of protein sequences can be transformed into alignments of the initial CDS sequences.
Synopsis
Global properties of the alignment: - seq_type() - aln_length() - aln_method() - consensus_cigar_line() I/O: - load_cigars_from_file() - print_alignment_to_file() - get_SimpleAlign() - get_4D_SimpleAlign()
Definition at line 45 of file AlignedMemberSet.pm.
Method Documentation
| protected Array Bio::EnsEMBL::Compara::AlignedMemberSet::_attr_to_copy_list | ( | ) |
Description: Returns the list of all the attributes to be copied by deep_copy() Returntype : Array of String Caller : General
Code:
Reimplemented from Bio::EnsEMBL::Compara::MemberSet.
Reimplemented in Bio::EnsEMBL::Compara::Family, and Bio::EnsEMBL::Compara::GeneTree.
| protected Array Bio::EnsEMBL::Compara::MemberSet::_get_Member | ( | ) | [inherited] |
Arg [1] : string $scope Arg [2] : string $key Example :
$family->_get_Member('_members_by_source', 'ENSEMBLPEP')
Description: Used as the generic reference point for all
get_Memeber_by* methods. The method searches the given
scope & if the values cannot be found will initialize that value
to an empty array reference.
Returntype : array reference of Bio::EnsEMBL::Compara::Member
Exceptions : None.
Caller : internal
Code:
| protected String Bio::EnsEMBL::Compara::AlignedMemberSet::_toString | ( | ) |
Description : Helper method for MemberSet::toString that provides class-specific information Returntype : String Exceptions : none Caller : internal
Code:
Reimplemented from Bio::EnsEMBL::Compara::MemberSet.
Reimplemented in Bio::EnsEMBL::Compara::GeneTree.
| public void Bio::EnsEMBL::Compara::MemberSet::add_Member | ( | ) | [inherited] |
Arg [1] : Bio::EnsEMBL::Compara::Member $member Example :
$gene_tree->add_Member($member);
Description: Add a new Member to this set Returntype : none Exceptions : Throws if input objects don't check Caller : general Status : Stable
Code:
Reimplemented in Bio::EnsEMBL::Compara::GeneTree.
| public Int Bio::EnsEMBL::Compara::AlignedMemberSet::aln_length | ( | ) |
Description : Getter/Setter for the aln_length field. This field contains
the length of the alignment
Returntype : Integer
Example : my $len = $tree->aln_length();
Caller : General
Code:
| public String Bio::EnsEMBL::Compara::AlignedMemberSet::aln_method | ( | ) |
Description : Getter/Setter for the aln_method field. This field should
represent the method used for the alignment
Returntype : String
Example : my $method = $tree->aln_method();
Caller : General
Code:
| public Bio::EnsEMBL::Compara::MemberSet::clear | ( | ) | [inherited] |
Arg [1] : None Description: Clears the list of members
Code:
| public String Bio::EnsEMBL::Compara::AlignedMemberSet::consensus_cigar_line | ( | ) |
Example :
my $consensus_cigar = $gene_tree->consensus_cigar_line();
Description: Creates a consensus cigar line for all the members of the
set. See Bio::EnsEMBL::Compara::AlignedMemberSet
Returntype : string
Caller : general
Code:
| public Bio::EnsEMBL::Compara::MemberSet Bio::EnsEMBL::Compara::MemberSet::deep_copy | ( | ) | [inherited] |
Description: Returns a copy of $self. All the members are themselves copied Returntype : Bio::EnsEMBL::Compara::MemberSet Caller : general Status : Stable
Code:
| public String Bio::EnsEMBL::Compara::MemberSet::description | ( | ) | [inherited] |
Arg [1] : string $description (optional) Example :
Description: Getter/setter for the description corresponding to this relation Returntype : string Exceptions : none Caller : general Status : Stable
Code:
| public Array Bio::EnsEMBL::Compara::MemberSet::gene_list | ( | ) | [inherited] |
Example :
my $pair = $homology->gene_list
Description: return the pair of members for the homology Returntype : array ref of (2) Bio::EnsEMBL::Compara::Member objects Caller : general
Code:
| public Bio::SimpleAlign Bio::EnsEMBL::Compara::AlignedMemberSet::get_4D_SimpleAlign | ( | ) |
Example :
$4d_align = $homology->get_4D_SimpleAlign();
Description: get 4 times degenerate positions pairwise simple alignment Returntype : Bio::SimpleAlign Caller : general
Code:
| public Array Bio::EnsEMBL::Compara::MemberSet::get_all_GeneMembers | ( | ) | [inherited] |
Arg [1] : (optional) genome db id Example :
my $gene_members = $ortholog->get_all_GeneMembers($genome_db->dbID')
Example :
my $gene_members = $ortholog->get_all_GeneMembers($genome_db->dbID)
Description: Returntype : array reference of Bio::EnsEMBL::Compara::Member Exceptions : Caller : public
Code:
| public Array Bio::EnsEMBL::Compara::MemberSet::get_all_GenomeDBs_by_member_source_name | ( | ) | [inherited] |
Arg [1] : string $source_name
e.g. "ENSEMBLPEP"
Example : Description: Returns the distinct GenomeDBs found in this family. Please note
that if you specify a source other than an EnsEMBL based one
the chances of getting back GenomeDBs are very low.
Returntype : array reference of distinct Bio::EnsEMBL::Compara::GenomeDB
objects found in this family
Exceptions :
Caller : public
Code:
| public Array Bio::EnsEMBL::Compara::MemberSet::get_all_Members | ( | ) | [inherited] |
Example :
Description: Returns all the members in this set Returntype : array reference of Bio::EnsEMBL::Compara::Member Exceptions : Caller :
Code:
Reimplemented in Bio::EnsEMBL::Compara::GeneTree.
| public Array Bio::EnsEMBL::Compara::MemberSet::get_all_taxa_by_member_source_name | ( | ) | [inherited] |
Arg [1] : string $source_name
e.g. "ENSEMBLPEP"
Example : Description: Returns the distinct taxons found in this family across
the specified source. If you do not specify a source then
the code will return all taxons in this family.
Returntype : array reference of distinct Bio::EnsEMBL::Compara::NCBITaxon
objects found in this family
Exceptions :
Caller : public
Code:
| public Array Bio::EnsEMBL::Compara::MemberSet::get_Member_by_GenomeDB | ( | ) | [inherited] |
Arg [1] : Bio::EnsEMBL::Compara::GenomeDB $genome_db Example :
$family->get_Member_by_GenomeDB($genome_db)
Description: Returns all [Member] entries linked to this GenomeDB. This will only return EnsEMBL based entries since UniProtKB entries are not linked to a GenomeDB. Returntype : array reference of Bio::EnsEMBL::Compara::Member Exceptions : If input is undefined & genome db is not of expected type Caller : public
Code:
| public Array Bio::EnsEMBL::Compara::MemberSet::get_Member_by_source | ( | ) | [inherited] |
Arg [1] : string $source_name
e.g. "ENSEMBLPEP"
Example : Description: Returntype : array reference of Bio::EnsEMBL::Compara::Member Exceptions : Caller : public
Code:
| public Array Bio::EnsEMBL::Compara::MemberSet::get_Member_by_source_GenomeDB | ( | ) | [inherited] |
Arg [1] : string $source_name Arg [2] : Bio::EnsEMBL::Compara::GenomeDB $genome_db Example :
$family->get_Member_by_source_taxon('ENSEMBLPEP', $genome_db)
Description: Returns all [Member] entries linked to this GenomeDB and the given source_name. This will only return EnsEMBL based entries since UniProtKB entries are not linked to a GenomeDB. Returntype : array reference of Bio::EnsEMBL::Compara::Member Exceptions : If input is undefined & genome db is not of expected type Caller : public
Code:
| public Array Bio::EnsEMBL::Compara::MemberSet::get_Member_by_source_taxon | ( | ) | [inherited] |
Arg [1] : string $source_name Arg [2] : int $taxon_id Example :
$family->get_Member_by_source_taxon('ENSEMBLPEP',9606)
Description: Returntype : array reference of Bio::EnsEMBL::Compara::Member Exceptions : Caller : public
Code:
| public Bio::SimpleAlign Bio::EnsEMBL::Compara::AlignedMemberSet::get_SimpleAlign | ( | ) |
Arg [-UNIQ_SEQ] : (opt) boolean (default: false)
: whether redundant sequences should be discarded
Arg [-ID_TYPE] (opt) string (one of 'STABLE'*, 'SEQ', 'MEMBER', 'DISPLAY')
: which identifier should be used as sequence names: the stable_id, the sequence_id, the seq_member_id, or the display_label
Arg [-STOP2X] (opt) boolean (default: false)
: whether the stop codons (character '*') should be replaced with gaps (character 'X')
other unusual aminoacids (U and O) are also replaced by their closest match (C and K)
Arg [-APPEND_TAXON_ID] (opt) boolean (default: false)
: whether the taxon_ids should be added to the sequence names
Arg [-APPEND_SP_SHORT_NAME] (opt) boolean (default: false)
: whether the species (in short name format) should be added to the sequence names
Arg [-APPEND_GENOMEDB_ID] (opt) boolean (default: false)
: whether the genome_db_id should be added to the sequence names
Arg [-APPEND_SPECIES_TREE_NODE_ID] (opt) hashref (default: undef)
: a hashref {genome_db_id => SpeciesTreeNode} that is used to append species_tree_node_ids
to the sequence names
Arg [-REMOVE_GAPS] (opt) boolean (default: false)
: whether columns that only contain gaps should be removed from the alignment
Arg [-SEQ_TYPE] (opt) string
: which sequence should be used instead of the default one.
: Can be 'exon_cased' for proteins and ncRNAs, and 'cds' for proteins only
Arg [-REMOVED_COLUMNS] (opt) arrayref of arrayrefs of 2 integers
: intervals of columns that have to be filtered out from the alignment
: Used to remove low-information sitesExample :
$tree->get_SimpleAlign(-SEQ_TYPE => 'cds');
Description: Returns the alignment as a BioPerl object Returntype : Bio::SimpleAlign Exceptions : none Caller : general
Code:
| public Boolean Bio::EnsEMBL::Compara::MemberSet::has_species_by_name | ( | ) | [inherited] |
Arg [1] : string $species_name Example :
my $ret = $homology->has_species_by_name("Homo sapiens");
Description: return TRUE or FALSE whether one of the members in the homology is from the given species Returntype : 1 or 0 Exceptions : Caller :
Code:
| public void Bio::EnsEMBL::Compara::AlignedMemberSet::load_cigars_from_file | ( | ) |
Arg [1] : string $file
The name of the file containing the multiple alignment
Arg [-IMPORT_SEQ] : (opt) boolean (default: false)
Whether the sequences of the members should be reassigned
using the alignment file
Arg [-CHECK_SEQ] : (opt) boolean (default: false)
Checks that all the sequences recovered from the alignment file
match the data in the Members
Arg [-FORMAT] : (opt) string (default: undef)
The format of the alignment. By default, BioPerl will try to
guess it from the file extension. Refer to
https://bioperl.org/howtos/AlignIO_and_SimpleAlign_HOWTO.html
for a list of the supported formats.
Arg [-ID_TYPE] (opt) string (one of 'STABLE', 'SEQ', 'MEMBER'*)
: which identifier should be used as sequence names:
the stable_id, the sequence_id, or the seq_member_id (default)
Example : $family->load_cigars_from_file('/tmp/clustalw.aln');
Description: Parses the multiple alignment fileand sets the cigar lines
of each of the members of this AlignedMemberSet
Returntype : none
Exceptions : thrown if file cannot be parsed
dies if a sequence identifier cannot be found in the set
dies if there is a sequence mismatch with the set
Code:
| public Int Bio::EnsEMBL::Compara::MemberSet::Member_count_by_GenomeDB | ( | ) | [inherited] |
Arg [1] : Bio::EnsEMBL::Compara::GenomeDB $genome_db Example :
Member_count_by_GenomeDB($genome_db);
Description: Convenience wrapper for member counts by a GenomeDB Returntype : int Exceptions : Thrown by subroutines this call. See get_Member equivalent Caller : public
Code:
| public Int Bio::EnsEMBL::Compara::MemberSet::Member_count_by_source | ( | ) | [inherited] |
Arg [1] : string $source_name
e.g. "ENSEMBLPEP"
Example : $family->Member_count_by_source('ENSEMBLPEP');
Description: Returntype : int Exceptions : Caller : public
Code:
| public Int Bio::EnsEMBL::Compara::MemberSet::Member_count_by_source_GenomeDB | ( | ) | [inherited] |
Arg [1] : string $source_name Arg [2] : Bio::EnsEMBL::Compara::GenomeDB $genome_db Example :
Member_count_by_source_GenomeDB('ENSEMBLPEP', $genome_db);
Description: Convenience wrapper for member counts by a GenomeDB Returntype : int Exceptions : Thrown by subroutines this call. See get_Member equivalent Caller : public
Code:
| public Int Bio::EnsEMBL::Compara::MemberSet::Member_count_by_source_taxon | ( | ) | [inherited] |
Arg [1] : string $source_name Arg [2] : int $taxon_id Example :
Member_count_by_source_taxon('ENSEMBLPEP',9606);
Description: Returntype : int Exceptions : Caller : public
Code:
| public Bio::EnsEMBL::Compara::MethodLinkSpeciesSet Bio::EnsEMBL::Compara::MemberSet::method_link_species_set | ( | ) | [inherited] |
Arg [1] : MethodLinkSpeciesSet object (optional) Example :
Description: getter/setter method for the MethodLinkSpeciesSet for this relation. Can lazy-load the method_link_species_set from the method_link_species_set_id if that one is set and the adaptor is set. Returntype : Bio::EnsEMBL::Compara::MethodLinkSpeciesSet Exceptions : throws if setting to an unsuitable object Caller : general Status : Stable
Code:
| public Int Bio::EnsEMBL::Compara::MemberSet::method_link_species_set_id | ( | ) | [inherited] |
Arg [1] : integer (optional) Example :
Description: getter/setter method for the internal ID of the MethodLinkSpeciesSet for this relation. Returntype : integer Exceptions : none Caller : general Status : Stable
Code:
| public Bio::EnsEMBL::Compara::AlignedMemberSet Bio::EnsEMBL::Compara::AlignedMemberSet::new | ( | ) |
Example :
Description: Returntype : Bio::EnsEMBL::Compara::AlignedMemberSet Exceptions : Caller :
Code:
Reimplemented from Bio::EnsEMBL::Compara::MemberSet.
Reimplemented in Bio::EnsEMBL::Compara::Family, and Bio::EnsEMBL::Compara::GeneTree.
| public Bio::SimpleAlign Bio::EnsEMBL::Compara::AlignedMemberSet::print_alignment_to_file | ( | ) |
Arg [1] : scalar (string or file handle) - output file
Arg [-FORMAT] : string - format of the output (cf BioPerl capabilities) (example: 'fasta')
Arg [-FLAT_DISPLAYNAME] : boolean - whether the sequence names in the alignment should be displayed "flat".
"flat" is a BioPerl option that means: without alignment start/end (e.g "/1-2542").
Arg [...] : all the other arguments of get_SimpleAlign
Example : $family->print_alignment_to_file(-APPEND_TAXON_ID => 1);
Description : Wrapper around get_SimpleAlign to print the alignment to a file (stdout by default) Returntype : Bio::SimpleAlign Exceptions : none Caller : general Status : Stable
Code:
| public Number Bio::EnsEMBL::Compara::MemberSet::print_sequences_to_file | ( | ) | [inherited] |
Arg [1] : scalar (string or file handle) - output file
Arg [-FORMAT] : string - format of the output (cf BioPerl capabilities) (example: 'fasta')
Arg [-UNIQ_SEQ] : boolean - whether only 1 copy of each sequence should be printed
(when multiple proteins share the same sequence)
Arg [...] : all the other arguments of SeqMember::bioseq()
Example : $family->print_sequences_to_file(-file => 'output.fa', -format => 'fasta', -id_type => 'MEMBER');
Description: Prints the sequences of the members into a file Returntype : number of unique sequences in the set Exceptions : none Caller : general Status : Stable
Code:
| public void Bio::EnsEMBL::Compara::MemberSet::remove_Member | ( | ) | [inherited] |
Arg [1] : Bio::EnsEMBL::Compara::Member $member Example :
$gene_tree->remove_Member($member);
Description: Remove a new Member from this set Returntype : none Exceptions : Throws if input objects don't check Caller : general Status : Stable
Code:
| public String Bio::EnsEMBL::Compara::AlignedMemberSet::seq_type | ( | ) |
Description : Getter/Setter for the seq_type field. This field contains
the type of sequence used for the members. If undefined,
the usual sequence is used. Otherwise, there must be a
matching sequence in the other_member_sequence table.
Returntype : String
Example : my $type = $tree->seq_type();
Caller : General
Code:
| public String Bio::EnsEMBL::Compara::MemberSet::stable_id | ( | ) | [inherited] |
Arg [1] : string $stable_id (optional) Example :
Description: Getter/setter for the stable ID of this relation Returntype : string Exceptions : none Caller : general Status : Stable
Code:
| public String Bio::EnsEMBL::Compara::MemberSet::toString | ( | ) | [inherited] |
Example :
$member_set->toString();
Description : Returns a description of this object as a string Returntype : String Exceptions : none Caller : general
Code:
Reimplemented in Bio::EnsEMBL::Compara::Homology.
| public String Bio::EnsEMBL::Compara::AlignedMemberSet::update_alignment_stats | ( | ) |
Arg [1] : (optional) $seq_type Example :
my $consensus_cigar = $gene_tree->consensus_cigar_line();
Description: Update the AlignedMemberSet properties (% identity, % coverage, etc) for the given seq_type (the default sequence is used otherwise) Returntype : string Caller : internal
Code:
| public Int Bio::EnsEMBL::Compara::MemberSet::version | ( | ) | [inherited] |
Arg [1] : string $version (optional) Example :
Description: Getter/setter for the version number of the stable ID Returntype : int Exceptions : none Caller : general Status : Stable
Code:
Member Data Documentation
Reimplemented from Bio::EnsEMBL::Compara::MemberSet.
Reimplemented in Bio::EnsEMBL::Compara::GeneTree.
Definition at line 191 of file AlignedMemberSet.pm.
The documentation for this class was generated from the following file:
- Bio/EnsEMBL/Compara/AlignedMemberSet.pm

