|
ensembl-hive
2.7.0
|
Public Member Functions | |
| public A | new () |
| public String | create_tempdir () |
| public void | remove_tempdir () |
| public void | write_sequence () |
| public void | run_blastz () |
| public void | lav_to_axt () |
| public void | find_best_alignment () |
| public void | parse_blastz_output () |
| public void | cleanup_tmpfiles () |
| public void | found_match () |
| public void | adjust_coords () |
| public | filter_overlaps () |
| public void | write_assembly () |
| public Int | stats_incr () |
| public void | init_stats () |
| public Int | get_stats () |
| public void | log_block_stats () |
| public void | log_overall_stats () |
| protected Values | _by_chr_num () |
| public String | AUTOLOAD () |
This modules contains helper functions to generate a whole genome alignment between two closely related assemblies using blastz from scratch. Alignments are then stored in an Ensembl assembly table. The module is part of a series of scripts to create a mapping between two assemblies. See "Related scripts" below for an overview of the whole process.
Definition at line 43 of file BlastzAligner.pm.
| protected Values AssemblyMapper::BlastzAligner::_by_chr_num | ( | ) |
Example :
Description : Subroutine to use in sort for sorting chromosomes. Sorts
numerically, then alphabetically
Return type : values to be used by sort
Exceptions : none
Caller : internal
Code:
| public void AssemblyMapper::BlastzAligner::adjust_coords | ( | ) |
Arg[1] : Int $A_start - start of alternatvie block in chromosomal coords
Arg[2] : Int $A_end - end of alternative block in chromosomal coords
Arg[3] : Arrayref $R_coords - list of start/end pairs of reference
blocks in chromosomal coords
Example :Description : Adjusts coordinates of blastz alignments to chromosomal coords. Return type : none Exceptions : none Caller : general
Code:
| public String AssemblyMapper::BlastzAligner::AUTOLOAD | ( | ) |
Arg[1] : (optional) String/Object - attribute to set Example :
Description : lazy function generator for getters/setters Return type : String/Object Exceptions : none Caller : general
Code:
| public void AssemblyMapper::BlastzAligner::cleanup_tmpfiles | ( | ) |
Arg[1-N] : (optional) list @files - additional tmp files to delete Example :
Description : deletes temporary files Return type : none Exceptions : Warning if file cannot be deleted Caller : general Status : stable
Code:
| public String AssemblyMapper::BlastzAligner::create_tempdir | ( | ) |
Arg[1] : String $tmpdir - temporary directory name Example :
Description : Creates a temporary directory in /tmp with a semi-random name
(username.timestamp.randomnumber). Alternatively, you can pass
it the name of a directory to use.
Return type : String - name of the tempdir created
Exceptions : Thrown if tempdir can't be created
Caller : general
Code:
| public AssemblyMapper::BlastzAligner::filter_overlaps | ( | ) |
Description :
Code:
| public void AssemblyMapper::BlastzAligner::find_best_alignment | ( | ) |
Example :
Description : Finds the best set of non-overlapping alignments by running
axtBest.
Return type : none
Exceptions : thrown if axtBest fails
Caller : general
Code:
| public void AssemblyMapper::BlastzAligner::found_match | ( | ) |
Arg[1] : Boolean $match_flag - flag indicating if last bp was a match
Arg[2] : Int $j - current bp position in the alignment
Arg[3] : Hashref $coords - alignment coordinates and strand from blastz
output
Description : Populates a datastructure describing blocks of alignment.
Return type : none
Exceptions : none
Caller : internal
Code:
| public Int AssemblyMapper::BlastzAligner::get_stats | ( | ) |
Arg[1] : String $code - stats code Example :
Description : Stats getter. Return type : Int - stats value Exceptions : none Caller : general
Code:
| public void AssemblyMapper::BlastzAligner::init_stats | ( | ) |
Arg[1] : Array @codes - stats codes to initialise Example :
Description : Initialises stats (i.e. sets to 0). Return type : none Exceptions : none Caller : general
Code:
| public void AssemblyMapper::BlastzAligner::lav_to_axt | ( | ) |
Example :
Description : Converts blastz output from lav to axt format. Target and query
sequences must be present in nib format in the temporary
directory for this to work.
Return type : none
Exceptions : thrown if lavToAxt fails
Caller : general
Code:
| public void AssemblyMapper::BlastzAligner::log_block_stats | ( | ) |
Arg[1] : Int $indent - indentation level Example :
Description : Logs stats for an alignment block. Return type : none Exceptions : none Caller : general
Code:
| public void AssemblyMapper::BlastzAligner::log_overall_stats | ( | ) |
Example :
Description : Logs overall alignment stats. Return type : none Exceptions : none Caller : general
Code:
| public A AssemblyMapper::BlastzAligner::new | ( | ) |
Arg[-SUPPORT] : a Bio::EnsEMBL::Utils::ConversionSupport object Example :
Description : object constructor method Return type : a BlastzAligner object Exceptions : none Caller : general
Code:
| public void AssemblyMapper::BlastzAligner::parse_blastz_output | ( | ) |
Example :
Description : Reads a blastz alignment result from an axt file and creates
a datastructure containing ungapped alignments from it. Note
that mismatches are allowed, but separate stats will be
collected for them.
Return type : none
Exceptions : none
Caller : general
Code:
| public void AssemblyMapper::BlastzAligner::remove_tempdir | ( | ) |
Example :
Description : Removes a temporary directory created by $self->create_tempdir. Return type : none Exceptions : none Caller : general
Code:
| public void AssemblyMapper::BlastzAligner::run_blastz | ( | ) |
Arg[1] : String $A_basename - basename of alternative fasta file Arg[2] : String $R_basename - basename of reference fasta file Example :
Description : Runs blastz between an alternative and multiple reference
sequences.
Return type : none
Exceptions : thrown if blastz fails
Caller : general
Code:
| public Int AssemblyMapper::BlastzAligner::stats_incr | ( | ) |
Arg[1] : String $code - stats code Arg[2] : Int $incr - number by which stats should be incremented Example :
Description : Increments stats. Return type : Int - stat value after increment Exceptions : none Caller : general
Code:
| public void AssemblyMapper::BlastzAligner::write_assembly | ( | ) |
Arg[1] : Bio::*::DBSQL::DBAdaptor $R_dba - reference database adaptor Example :
Description : Writes assembly entries for blastz alignments to the database. Return type : none Exceptions : none Caller : general
Code:
| public void AssemblyMapper::BlastzAligner::write_sequence | ( | ) |
Arg[1] : Bio::EnsEMBL::Slice $slice - slice for which to write sequence Arg[2] : String $assembly - assembly name Arg[3] : String $basename1 - basename of single sequence file Arg[4] : (optional) String $basename2 - basename of multiple sequence file Example :
Description : Writes a slice's sequence to a fasta file and converts it to nib
format. Optionally appends the sequence to another
multi-sequence fasta file.
Return type : none
Exceptions : thrown if faToNib or file appending fails
Caller : general
Code: