NAME
Bio::Assembly::Contig - Perl module to hold and manipulate
sequence assembly contigs.
SYNOPSIS
# Module loadinguse Bio::Assembly::IO;# Assembly loading methods$aio = Bio::Assembly::IO->new(-file=>"test.ace.1",-format=>'phrap');$assembly = $aio->next_assembly;foreach $contig ($assembly->all_contigs) {# do something}# OR, if you want to build the contig yourself,use Bio::Assembly::Contig;$c = Bio::Assembly::Contig->new(-id=>"1");$ls = Bio::LocatableSeq->new(-seq=>"ACCG-T",-id=>"r1",-alphabet=>'dna');$ls2 = Bio::LocatableSeq->new(-seq=>"ACA-CG-T",-id=>"r2",-alphabet=>'dna');$ls_coord = Bio::SeqFeature::Generic->new(-start=>3,-end=>8,-strand=>1);$ls2_coord = Bio::SeqFeature::Generic->new(-start=>1,-end=>8,-strand=>1);$c->add_seq($ls);$c->add_seq($ls2);$c->set_seq_coord($ls_coord,$ls);$c->set_seq_coord($ls2_coord,$ls2);$con = Bio::LocatableSeq->new(-seq=>"ACACCG-T",-alphabet=>'dna');$c->set_consensus_sequence($con);$l = $c->change_coord('unaligned r2','ungapped consensus',6);print "6 in unaligned r2 => $l in ungapped consensus\n";
DESCRIPTION
A contig is as a set of sequences, locally aligned to each other, so that every sequence has overlapping regions with at least one sequence in the contig, such that a continuous of overlapping sequences is formed, allowing the deduction of a consensus sequence which may be longer than any of the sequences from which it was deduced.
In this documentation we refer to the overlapping sequences used to build the contig as "aligned sequences" and to the sequence deduced from the overlap of aligned sequences as the "consensus". Methods to deduce the consensus sequence from aligned sequences were not yet implemented in this module, but its posssible to add a consensus sequence deduced by other means, e.g, by the assembly program used to build the alignment.
All aligned sequences in a Bio::Assembly::Contig must be Bio::Assembly::Locatable objects and have a unique ID. The unique ID restriction is due to the nature of the module's internal data structures and is also a request of some assembly programs. If two sequences with the same ID are added to a contig, the first sequence added is replaced by the second one.
Coordinate_systems
There are four base coordinate systems in Bio::Assembly::Contig. When you need to access contig elements or data that exists on a certain range or location, you may be specifying coordinates in relation to different sequences, which may be either the contig consensus or one of the aligned sequences that were used to do the assembly.
=========================================================Name | Referenced sequence---------------------------------------------------------"gapped consensus" | Contig (with gaps)"ungapped consensus" | Contig (without gaps)"aligned $seqID" | sequence $seqID (with gaps)"unaligned $seqID" | sequence $seqID (without gaps)=========================================================
"gapped consensus" refers to positions in the aligned consensus sequence, which is the consensus sequence including the gaps inserted to align it against the aligned sequences that were used to assemble the contig. So, its limits are [ 1, (consensus length + number of gaps in consensus) ]
"ungapped consensus" is a coordinate system based on the consensus sequence, but excluding consensus gaps. This is just the coordinate system that you have when considering the consensus sequence alone, instead of aligned to other sequences.
"aligned $seqID" refers to locations in the sequence $seqID after alignment of $seqID against the consensus sequence (reverse complementing the original sequence, if needed). Coordinate 1 in "aligned $seqID" is equivalent to the start location (first base) of $seqID in the consensus sequence, just like if the aligned sequence $seqID was a feature of the consensus sequence.
"unaligned $seqID" is equivalent to a location in the isolated sequence, just like you would have when considering the sequence alone, out of an alignment. When changing coordinates from "aligned $seq2" to "unaligned $seq2", if $seq2 was reverse complemented when included in the alignment, the output coordinates will be reversed to fit that fact, i.e. 1 will be changed to length($seq2), 2 will be length($seq)-1 and so on.
An important note: when you change gap coordinates from a gapped system ("gapped consensus" or "aligned $seqID") to a system that does not include gaps ("ungapped consensus" or "unaligned $seqID"), the position returned will be the first location before all gaps neighboring the input location.
Feature_collection
Bio::Assembly::Contig stores much information about a contig in a Bio::Assembly::SeqFeature::Collection object. Relevant information on the alignment is accessed by selecting features based on their primary tags (e.g. all features which have a primary tag of the form '_aligned_coord:$seqID', where $seqID is an aligned sequence ID, are coordinates for sequences in the contig alignment) and, by using methods from Bio::Assembly::SeqFeature::Collection, it's possible to select features by overlap with other features.
We suggest that you use the primary tags of features as identifiers for feature classes. By convention, features with primary tags starting with a '_' are generated by modules that populate the contig data structure and return the contig object, maybe as part of an assembly object, e.g. drivers from the Bio::Assembly::IO set.
Features in the features collection may be associated with particular aligned sequences. To obtain this, you must attach the sequence to the feature, using attach() seq from Bio::Assembly::SeqFeatureI, before you add the feature to the feature collection. We also suggest to add the sequence id to the primary tag, so that is easy to select feature for a particular sequence.
There is only one feature class that some methods in Bio::Assembly::Contig expect to find in the feature collection: features with primary tags of the form '_aligned_coord:$seqID', where $seqID is the aligned sequence id (like returned by $seq->id()). These features describe the position (in "gapped consensus" coordinates) of aligned sequences, and the method set_seq_coord() automatically changes a feature's primary tag to this form whenever the feature is added to the collection by this method. Only two methods in Bio::Assembly::Contig will not work unless there are features from this class: change_coord() and get_seq_coord().
Other feature classes will be automatically available only when Bio::Assembly::Contig objects are created by a specific module. Such feature classes are (or should be) documented in the documentation of the module which create them, to which the user should refer.
FEEDBACK
Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing lists Your participation is much appreciated.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
AUTHOR - Robson Francisco de Souza
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
Object creator
new
Title : newUsage : my $contig = Bio::Assembly::Contig->new();Function : Creates a new contig objectReturns : Bio::Assembly::ContigArgs : -id => unique contig ID-source => string for the sequence assembly program used-collection => Bio::SeqFeature::CollectionI instance
Assembly related methods
These methods exist to enable adding information about possible relations among contigs, e.g. when you already have a scaffold for your assembly, describing the ordering of contigs in the final assembly, but no sequences covering the gaps between neighboring contigs.
source
Title : sourceUsage : $contig->source($program);Function : Get/Set program used to build this contigReturns : stringArgument : [optional] string
assembly
Title : assemblyUsage : $contig->assembly($assembly);Function : Get/Set assembly object for this contigReturns : a Bio::Assembly::Scaffold objectArgument : a Bio::Assembly::Scaffold object
strand
Title : strandUsage : $contig->strand($num);Function : Get/Set contig orientation in a scaffold/assembly.Its equivalent to the strand property of sequenceobjects and sets whether the contig consensus shouldbe reversed and complemented before being added to ascaffold or assembly.Returns : integerArgument : 1 if orientaion is forward, -1 if reverse and0 if none
upstream_neighbor
Title : upstream_neighborUsage : $contig->upstream_neighbor($contig);Function : Get/Set a contig neighbor for the current contig whenbuilding a scaffold. The upstream neighbor islocated before $contig first baseReturns : nothingArgument : Bio::Assembly::Contig
downstream_neighbor
Title : downstream_neighborUsage : $contig->downstream_neighbor($num);Function : Get/Set a contig neighbor for the current contig whenbuilding a scaffold. The downstream neighbor islocated after $contig last baseReturns : nothingArgument : Bio::Assembly::Contig
Contig feature collection methods
add_features
Title : add_featuresUsage : $contig->add_features($feat,$flag)Function :Add an array of features to the contig featurecollection. The consensus sequence may be attached to theadded feature, if $flag is set to 1. If $flag is 0 andthe feature attached to one of the contig alignedsequences, the feature is registered as an alignedsequence feature. If $flag is 0 and the feature is notattached to any sequence in the contig, the feature issimply added to the feature collection and no attachmentor registration is made.Note: You must attach aligned sequences to their featuresprior to calling add_features, otherwise you won't beable to access the feature through get_seq_feat_by_tag()method.Returns : number of features added.Argument :$feat : A reference to an array of Bio::SeqFeatureI$flag : boolean - true if consensus sequence objectshould be attached to this feature, false ifno consensus attachment should be made.Default: false.
remove_features
Title : remove_featuresUsage : $contig->remove_features(@feat)Function : Remove an array of contig featuresReturns : true if successfulArgument : An array of Bio::SeqFeature::Generic (Bio::SeqFeatureI)
get_features_collection
Title : get_features_collectionUsage : $contig->get_features_collection()Function : Get the collection of all contig features and seqfeaturesReturns : Bio::DB::SeqFeature::Store (Bio::SeqFeature::CollectionI)Argument : none
remove_features_collection
Title : remove_features_collectionUsage : $contig->remove_features_collection()Function : Remove the collection of all contig features. It is usefulto save some memory (when contig features are not needed).Returns : noneArgument : none
Coordinate system's related methods
See Coordinate_Systems above.
change_coord
Title : change_coordUsage : $contig->change_coord($in,$out,$query)Function :Change coordinate system for $query. This methodtransforms locations between coordinate systems describedin section "Coordinate Systems" of this document.Note: this method will throw an exception when changingcoordinates between "ungapped consensus" and othersystems if consensus sequence was not set. It will alsothrow exceptions when changing coordinates among alignedsequence, either with or without gaps, and other systemsif sequence locations were not set with set_seq_coord().Returns : integerArgument :$in : [string] input coordinate system$out : [string] output coordinate system$query : [integer] a position in a sequence
get_seq_coord
Title : get_seq_coordUsage : $contig->get_seq_coord($seq);Function : Get "gapped consensus" location for aligned sequenceReturns : Bio::SeqFeature::Generic for coordinates or undef.A warning is printed if sequence coordinates were not set.Argument : Bio::LocatableSeq object
set_seq_coord
Title : set_seq_coordUsage : $contig->set_seq_coord($feat,$seq);Function :Set "gapped consensus" location for an alignedsequence. If the sequence was previously added usingadd_seq, its coordinates are changed/set. Otherwise,add_seq is called and the sequence is added to thecontig.Returns : Bio::SeqFeature::Generic for old coordinates or undef.Argument :$feat : a Bio::SeqFeature::Generic objectrepresenting a location for thealigned sequence, in "gappedconsensus" coordinates.Note: the original feature primary tag willbe lost.$seq : a Bio::LocatableSeq object
Bio::Assembly::Contig consensus methods
set_consensus_sequence
Title : set_consensus_sequenceUsage : $contig->set_consensus_sequence($seq)Function : Set the consensus sequence object for this contigReturns : consensus lengthArgument : Bio::LocatableSeq
set_consensus_quality
Title : set_consensus_qualityUsage : $contig->set_consensus_quality($qual)Function : Set the quality object for consensus sequenceReturns : nothingArgument : Bio::Seq::QualI object
get_consensus_length
Title : get_consensus_lengthUsage : $contig->get_consensus_length()Function : Get consensus sequence lengthReturns : integerArgument : none
get_consensus_sequence
Title : get_consensus_sequenceUsage : $contig->get_consensus_sequence()Function : Get a reference to the consensus sequence objectfor this contigReturns : Bio::SeqI objectArgument : none
get_consensus_quality
Title : get_consensus_qualityUsage : $contig->get_consensus_quality()Function : Get a reference to the consensus quality objectfor this contig.Returns : A Bio::Seq::QualI objectArgument : none
Bio::Assembly::Contig aligned sequences methods
set_seq_qual
Title : set_seq_qualUsage : $contig->set_seq_qual($seq,$qual);Function : Adds quality to an aligned sequence.Returns : nothingArgument : a Bio::LocatableSeq object anda Bio::Seq::QualI object
See Bio::LocatableSeq for more information.
get_seq_ids
Title : get_seq_idsUsage : $contig->get_seq_ids( -start => $start,-end => $end,-type => "gapped A0QR67B08.b" );Function : Get list of sequence IDs overlapping interval [$start, $end]The default interval is [1,$contig->length]Default coordinate system is "gapped contig"Returns : An arrayArgument : A hash with optional elements:-start : consensus subsequence start-end : consensus subsequence end-type : the coordinate system type for $start and $end argumentsCoordinate system available are:"gapped consensus" : consensus coordinates with gaps"ungapped consensus" : consensus coordinates without gaps"aligned $ReadID" : read $ReadID coordinates with gaps"unaligned $ReadID" : read $ReadID coordinates without gaps
get_seq_feat_by_tag
Title : get_seq_feat_by_tagUsage : $seq = $contig->get_seq_feat_by_tag($seq,"_aligned_coord:$seqID")Function : Get a sequence feature based on its primary_tag.Returns : a Bio::SeqFeature objectArgument : a Bio::LocatableSeq and a string (feature primary tag)
get_seq_by_name
Title : get_seq_by_nameUsage : $seq = $contig->get_seq_by_name('Seq1')Function : Gets a sequence based on its id.Returns : a Bio::LocatableSeq objectundef if name is not foundArgument : string
get_qual_by_name
Title : get_qual_by_nameUsage : $seq = $contig->get_qual_by_name('Seq1')Function :Gets Bio::Seq::QualI object for a sequencethrough its id ( as given by $qual->id() ).Returns : a Bio::Seq::QualI object.undef if name is not foundArgument : string
Bio::Align::AlignI compatible methods
Modifier methods
These methods modify the MSE by adding, removing or shuffling complete sequences.
add_seq
Title : add_seqUsage : $contig->add_seq($newseq);Function :Adds a sequence to the contig. *Does**not* align it - just adds it to thehashes.Returns : nothingArgument : a Bio::LocatableSeq object
See Bio::LocatableSeq for more information.
remove_seq
Title : remove_seqUsage : $contig->remove_seq($seq);Function : Removes a single sequence from a contigReturns : 1 on success, 0 otherwiseArgument : a Bio::LocatableSeq object
purge
Title : purgeUsage : $contig->purge(0.7);Function:Removes sequences above whatever %id.This function will grind on large alignments. Beware!(perhaps not ideally implemented)Example :Returns : An array of the removed sequencesArgument:
sort_alphabetically
Title : sort_alphabeticallyUsage : $contig->sort_alphabeticallyFunction :Changes the order of the alignment to alphabetical on namefollowed by numerical by number.Returns :Argument :
Sequence selection methods
Methods returning one or more sequences objects.
each_seq
Title : each_seqUsage : foreach $seq ( $contig->each_seq() )Function : Gets an array of Seq objects from the alignmentReturns : an arrayArgument :
each_alphabetically
Title : each_alphabeticallyUsage : foreach $seq ( $contig->each_alphabetically() )Function :Returns an array of sequence object sorted alphabeticallyby name and then by start point.Does not change the order of the alignmentReturns :Argument :
each_seq_with_id
Title : each_seq_with_idUsage : foreach $seq ( $contig->each_seq_with_id() )Function :Gets an array of Seq objects from thealignment, the contents being those sequenceswith the given name (there may be more than one)Returns : an arrayArgument : a seq name
get_seq_by_pos
Title : get_seq_by_posUsage : $seq = $contig->get_seq_by_pos(3)Function :Gets a sequence based on its position in the alignment.Numbering starts from 1. Sequence positions larger thannum_sequences() will thow an error.Returns : a Bio::LocatableSeq objectArgument : positive integer for the sequence osition
Create new alignments
The result of these methods are horizontal or vertical subsets of the current MSE.
select
Title : selectUsage : $contig2 = $contig->select(1, 3) # three first sequencesFunction :Creates a new alignment from a continuous subset ofsequences. Numbering starts from 1. Sequence positionslarger than num_sequences() will thow an error.Returns : a Bio::Assembly::Contig objectArgument : positive integer for the first sequencepositive integer for the last sequence to include (optional)
select_noncont
Title : select_noncontUsage : $contig2 = $contig->select_noncont(1, 3) # first and 3rd sequencesFunction :Creates a new alignment from a subset ofsequences. Numbering starts from 1. Sequence positionslarger than num_sequences() will throw an error.Returns : a Bio::Assembly::Contig objectArgs : array of integers for the sequences
slice
Title : sliceUsage : $contig2 = $contig->slice(20, 30)Function :Creates a slice from the alignment inclusive of start andend columns. Sequences with no residues in the slice areexcluded from the new alignment and a warning is printed.Slice beyond the length of the sequence does not dopadding.Returns : a Bio::Assembly::Contig objectArgument : positive integer for start columnpositive integer for end column
Change sequences within the MSE
These methods affect characters in all sequences without changeing the alignment.
map_chars
Title : map_charsUsage : $contig->map_chars('\.','-')Function :Does a s/$arg1/$arg2/ on the sequences. Useful for gapcharactersNotice that the from (arg1) is interpretted as a regex,so be careful about quoting meta characters (eg$contig->map_chars('.','-') won't do what you want)Returns :Argument : 'from' rexexp'to' string
uppercase
Title : uppercase()Usage : $contig->uppercase()Function : Sets all the sequences to uppercaseReturns :Argument :
match_line
Title : match_line()Usage : $contig->match_line()Function : Generates a match line - much like consensus stringexcept that a line indicating the '*' for a match.Argument : (optional) Match line characters ('*' by default)(optional) Strong match char (':' by default)(optional) Weak match char ('.' by default)
match
Title : match()Usage : $contig->match()Function :Goes through all columns and changes residues that areidentical to residue in first sequence to match '.'character. Sets match_char.USE WITH CARE: Most MSE formats do not support matchcharacters in sequences, so this is mostly for outputonly. NEXUS format (Bio::AlignIO::nexus) can handleit.Returns : 1Argument : a match character, optional, defaults to '.'
unmatch
Title : unmatch()Usage : $contig->unmatch()Function :Undoes the effect of method match. Unsets match_char.Returns : 1Argument : a match character, optional, defaults to '.'
MSE attibutes
Methods for setting and reading the MSE attributes.
Note that the methods defining character semantics depend on the user to set them sensibly. They are needed only by certain input/output methods. Unset them by setting to an empty string ('').
id
Title : idUsage : $contig->id("Ig")Function : Gets/sets the id field of the alignmentReturns : An id stringArgument : An id string (optional)
missing_char
Title : missing_charUsage : $contig->missing_char("?")Function : Gets/sets the missing_char attribute of the alignmentIt is generally recommended to set it to 'n' or 'N'for nucleotides and to 'X' for protein.Returns : An missing_char string,Argument : An missing_char string (optional)
match_char
Title : match_charUsage : $contig->match_char('.')Function : Gets/sets the match_char attribute of the alignmentReturns : An match_char string,Argument : An match_char string (optional)
gap_char
Title : gap_charUsage : $contig->gap_char('-')Function : Gets/sets the gap_char attribute of the alignmentReturns : An gap_char string, defaults to '-'Argument : An gap_char string (optional)
symbol_chars
Title : symbol_charsUsage : my @symbolchars = $contig->symbol_chars;Function: Returns all the seen symbols (other than gaps)Returns : array of characters that are the seen symbolsArgument: boolean to include the gap/missing/match characters
Alignment descriptors
These read only methods describe the MSE in various ways.
consensus_string
Title : consensus_stringUsage : $str = $contig->consensus_string($threshold_percent)Function : Makes a strict consensusReturns :Argument : Optional threshold ranging from 0 to 100.The consensus residue has to appear at least threshold %of the sequences at a given location, otherwise a '?'character will be placed at that location.(Default value = 0%)
consensus_iupac
Title : consensus_iupacUsage : $str = $contig->consensus_iupac()Function :Makes a consensus using IUPAC ambiguity codes from DNAand RNA. The output is in upper case except when gaps ina column force output to be in lower case.Note that if your alignment sequences contain a lot ofIUPAC ambiquity codes you often have to manually setalphabet. Bio::PrimarySeq::_guess_type thinks theyindicate a protein sequence.Returns : consensus stringArgument : noneThrows : on protein sequences
is_flush
Title : is_flushUsage : if( $contig->is_flush() )::Function : Tells you whether the alignment: is flush, ie all of the same length::Returns : 1 or 0Argument :
length
Title : length()Usage : $len = $contig->length()Function : Returns the maximum length of the alignment.To be sure the alignment is a block, use is_flushReturns :Argument :
maxname_length
Title : maxname_lengthUsage : $contig->maxname_length()Function :Gets the maximum length of the displayname in thealignment. Used in writing out various MSE formats.Returns : integerArgument :
num_residues
Title : num_residuesUsage : $no = $contig->num_residuesFunction : number of residues in total in the alignmentReturns : integerArgument :Note : replaces no_residues
num_sequences
Title : num_sequencesUsage : $depth = $contig->num_sequencesFunction : number of sequence in the sequence alignmentReturns : integerArgument : NoneNote : replaces no_sequences
percentage_identity
Title : percentage_identityUsage : $id = $contig->percentage_identityFunction: The function calculates the percentage identity of the alignmentReturns : The percentage identity of the alignment (as defined by theimplementation)Argument: None
overall_percentage_identity
Title : percentage_identityUsage : $id = $contig->percentage_identityFunction: The function calculates the percentage identity ofthe conserved columnsReturns : The percentage identity of the conserved columnsArgs : None
average_percentage_identity
Title : average_percentage_identityUsage : $id = $contig->average_percentage_identityFunction: The function uses a fast method to calculate the averagepercentage identity of the alignmentReturns : The average percentage identity of the alignmentArgs : None
Alignment positions
Methods to map a sequence position into an alignment column and back. column_from_residue_number() does the former. The latter is really a property of the sequence object and can done using Bio::LocatableSeq::location_from_column:
# select somehow a sequence from the alignment, e.g.my $seq = $contig->get_seq_by_pos(1);#$loc is undef or Bio::LocationI objectmy $loc = $seq->location_from_column(5);
column_from_residue_number
Title : column_from_residue_numberUsage : $col = $contig->column_from_residue_number( $seqname, $resnumber)Function:This function gives the position in the alignment(i.e. column number) of the given residue number in thesequence with the given name. For example, for thealignmentSeq1/91-97 AC..DEF.GHSeq2/24-30 ACGG.RTY..Seq3/43-51 AC.DDEFGHIcolumn_from_residue_number( "Seq1", 94 ) returns 5.column_from_residue_number( "Seq2", 25 ) returns 2.column_from_residue_number( "Seq3", 50 ) returns 9.An exception is thrown if the residue number would lieoutside the length of the aligment(e.g. column_from_residue_number( "Seq2", 22 )Note: If the the parent sequence is represented by more thanone alignment sequence and the residue number is present inthem, this method finds only the first one.Returns : A column number for the position in the alignment of thegiven residue in the given sequence (1 = first column)Args : A sequence id/name (not a name/start-end)A residue number in the whole sequence (not just thatsegment of it in the alignment)
Sequence names
Methods to manipulate the display name. The default name based on the sequence id and subsequence positions can be overridden in various ways.
displayname
Title : displaynameUsage : $contig->displayname("Ig", "IgA")Function : Gets/sets the display name of a sequence in the alignment:Returns : A display name stringArgument : name of the sequencedisplayname of the sequence (optional)
set_displayname_count
Title : set_displayname_countUsage : $contig->set_displayname_countFunction :Sets the names to be name_# where # is the number oftimes this name has been used.Returns : NoneArgument : None
set_displayname_flat
Title : set_displayname_flatUsage : $contig->set_displayname_flat()Function : Makes all the sequences be displayed as just their name,not name/start-endReturns : 1Argument : None
set_displayname_normal
Title : set_displayname_normalUsage : $contig->set_displayname_normal()Function : Makes all the sequences be displayed as name/start-endReturns : NoneArgument : None
Internal Methods
_binary_search
Title : _binary_searchUsage : _binary_search($list,$query)Function :Find a number in a sorted list of numbers. Return valuesmay be on or two integers. One positive integer or zero(>=0) is the index of the element that stores the queriedvalue. Two positive integers (or zero and anothernumber) are the indexes of elements among which thequeried value should be placed. Negative single valuesmean:-1: $query is smaller than smallest element in list-2: $query is greater than greatest element in listReturns : array of integersArgument :$list : array reference$query : integer
_compare
Title : _compareUsage : _compare($arg1,$arg2)Function: Perform numeric or string comparisonsReturns : integer (0, 1 or -1)Args : values to be compared
_nof_gaps
Title : _nof_gapsUsage : _nof_gaps($array_ref, $query)Function: number of gaps found before position $queryReturns : integerArgs :$array_ref : gap registry reference$query : [integer] a position in a sequence
_padded_unpadded
Title : _padded_unpaddedUsage : _padded_unpadded($array_ref, $query)Function:Returns a coordinate corresponding toposition $query after gaps wereremoved from a sequence.Returns : integerArgs :$array_ref : reference to this gap registry$query : [integer] coordionate to change
_unpadded_padded
Title : _unpadded_paddedUsage : _unpadded_padded($array_ref, $query)Function:Returns the value corresponding toungapped position $query when gaps arecounted as valid sites in a sequenceReturns :Args : $array_ref = a reference to this sequence's gap registry$query = [integer] location to change
_register_gaps
Title : _register_gapsUsage : $self->_register_gaps($seq, $array_ref)Function: stores gap locations for a sequenceReturns : number of gaps foundArgs :$seq : sequence string$array_ref : a reference to an array,where gap locations willbe stored
Deprecated methods
no_residues
Title : no_residuesUsage : $no = $ali->no_residuesFunction : number of residues in total in the alignmentReturns : integerArgument :Note : deprecated in favor of num_residues()
no_sequences
Title : no_sequencesUsage : $depth = $ali->no_sequencesFunction : number of sequence in the sequence alignmentReturns : integerArgument :Note : deprecated in favor of num_sequences()