org::gel::mauve::XMFAAlignment Class Reference

XMFA file class A technical cross-product of insomnia and indulgence. More...

Collaboration diagram for org::gel::mauve::XMFAAlignment:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void getColumnCoordinates (XmfaViewerModel model, int lcb, long column, long[] seq_offsets, boolean[] gap)
 Returns the sequence coordinates aligned in a given column, ordered according to source index.

String getComment (int lcbI)
 Read a comment line from an LCB The LCB comment line is the terminator line that begins with =.

long getCoordinate (XmfaViewerModel model, Genome g, int lcb, long column, Boolean gap)
 Returns a sequence coordinate aligned in a given column for a specific genome.

long[] getLCBAndColumn (Genome g, long position)
 Identifies the LCB and the column within the LCB of a given sequence position.

long getLcbLength (int lcbId)
 Returns the length in alignment columns of a particular LCB.

String getName (int seqI)
 Read the source file name of a given sequence.

byte[][] getRange (Genome g, long lend, long rend)
 Extracts columns from the sequence alignment containing the specified range of the specified sequence.

LCB[] getSourceLcbList ()
byte[] readRawSequence (int ivI, int seqI, long left_col, long length)
 Read sequence data (and any gap characters) from a file, filtering newlines column index starts at 0!!

void setFile (RandomAccessFile f)
 Sets the file used as backing store for this alignment Call this method to set the file after reading a serialized XMFAAlignment.

void setReference (Genome g)
 Reorder the sequences to conform to the order given in new_order[].

void setSourceLcbList (LCB[] source_lcb_list)

Static Public Member Functions

byte[] filterNewlines (byte[] byte_buf)

Public Attributes

Properties metadata = new Properties ()

Protected Attributes

int buffer_size = 500000
String[] comments
Match[] file_pos
Match[] intervals
LCB[] lcb_list
int line_width = 80
String[] names
int newline_size = 0
int seq_count = 0
long[] seq_length
TreeStore ts = new TreeStore ()
transient RandomAccessFile xmfa_file

Package Functions

int filterGapsInOneSequence (int seqI, Object[] byte_bufs)
 filter gaps from one sequence while maintaining the columns of the alignment return the number of columns remaining after filtering

int getLCB (Genome g, long position)
 return the LCB index that contains the given position of the given sequence

long globalToLCB (long position, Genome g, int ivI)
 converts a global sequence coordinate to an LCB local coordinate, taking rev.

long LCBToGlobal (long position, Genome g, int ivI)
 converts an LCB local coordinate to a global sequence coordinate, taking rev.

long revCompify (long position, Genome g, int ivI)
void reverse (byte[] byte_buf)
 reverse entries in a byte array

 SuppressWarnings ("unchecked") public XMFAAlignment(RandomAccessFile ir) throws java.io.IOException
 Constructor reads an XMFA alignment from an input file and indexes the location of alignment bounds.


Package Attributes

GISTree[][] gis_tree

Static Package Attributes

final long serialVersionUID = 5
 Versioning for serializations of this object.


Private Attributes

LCB[] source_lcb_list

Detailed Description

XMFA file class A technical cross-product of insomnia and indulgence.

Definition at line 18 of file XMFAAlignment.java.


Member Function Documentation

int org::gel::mauve::XMFAAlignment::filterGapsInOneSequence int  seqI,
Object[]  byte_bufs
[inline, package]
 

filter gaps from one sequence while maintaining the columns of the alignment return the number of columns remaining after filtering

Definition at line 604 of file XMFAAlignment.java.

References seq_count.

byte [] org::gel::mauve::XMFAAlignment::filterNewlines byte[]  byte_buf  )  [inline, static]
 

Definition at line 733 of file XMFAAlignment.java.

void org::gel::mauve::XMFAAlignment::getColumnCoordinates XmfaViewerModel  model,
int  lcb,
long  column,
long[]  seq_offsets,
boolean[]  gap
[inline]
 

Returns the sequence coordinates aligned in a given column, ordered according to source index.

Parameters:
seq_offsets The sequence coordinates (output)
gap True whenever a given sequence has a gap in the query column

Definition at line 830 of file XMFAAlignment.java.

References org::gel::mauve::BaseViewerModel::getGenomeBySourceIndex(), org::gel::mauve::Genome::getLength(), org::gel::mauve::Genome::getSourceIndex(), LCBToGlobal(), and seq_count.

Referenced by org::gel::mauve::analysis::OneToOneOrthologExporter::addOverlappingCDS(), org::gel::mauve::analysis::OneToOneOrthologExporter::getBackboneSegs(), org::gel::mauve::XmfaViewerModel::getColumnCoordinates(), org::gel::mauve::analysis::SnpExporter::getSNPs(), and org::gel::mauve::analysis::SnpExporter::SuppressWarnings().

String org::gel::mauve::XMFAAlignment::getComment int  lcbI  )  [inline]
 

Read a comment line from an LCB The LCB comment line is the terminator line that begins with =.

Parameters:
lcbI The LCB to read a comment line from
Returns:
The comment line

Definition at line 490 of file XMFAAlignment.java.

long org::gel::mauve::XMFAAlignment::getCoordinate XmfaViewerModel  model,
Genome  g,
int  lcb,
long  column,
Boolean  gap
[inline]
 

Returns a sequence coordinate aligned in a given column for a specific genome.

Returns:
The sequence coordinate

Definition at line 849 of file XMFAAlignment.java.

References org::gel::mauve::Genome::getSourceIndex(), and LCBToGlobal().

Referenced by org::gel::mauve::histogram::HistogramBuilder::build().

int org::gel::mauve::XMFAAlignment::getLCB Genome  g,
long  position
[inline, package]
 

return the LCB index that contains the given position of the given sequence

Definition at line 751 of file XMFAAlignment.java.

References org::gel::mauve::Match::getLength(), org::gel::mauve::Match::getStart(), and intervals.

Referenced by org::gel::mauve::XmfaViewerModel::getLCBIndex(), and getRange().

long [] org::gel::mauve::XMFAAlignment::getLCBAndColumn Genome  g,
long  position
[inline]
 

Identifies the LCB and the column within the LCB of a given sequence position.

Returns:
an array of 2 longs. The first being the LCB by index, and the second the column

Definition at line 807 of file XMFAAlignment.java.

Referenced by org::gel::mauve::analysis::OneToOneOrthologExporter::addOverlappingCDS(), org::gel::mauve::analysis::OneToOneOrthologExporter::getBackboneSegs(), org::gel::mauve::XmfaViewerModel::getLCBAndColumn(), and org::gel::mauve::backbone::BackboneList::getNextBackbone().

long org::gel::mauve::XMFAAlignment::getLcbLength int  lcbId  )  [inline]
 

Returns the length in alignment columns of a particular LCB.

Parameters:
lcbId The index of the LCB in question
Returns:
a long int with the length

Definition at line 865 of file XMFAAlignment.java.

Referenced by org::gel::mauve::histogram::HistogramBuilder::build(), org::gel::mauve::analysis::SnpExporter::getSNPs(), and org::gel::mauve::analysis::SnpExporter::SuppressWarnings().

String org::gel::mauve::XMFAAlignment::getName int  seqI  )  [inline]
 

Read the source file name of a given sequence.

Parameters:
seqI The sequence index (starting at 0)
Returns:
The source file name

Definition at line 501 of file XMFAAlignment.java.

Referenced by org::gel::mauve::GenomeBuilder::buildGenome(), and org::gel::mauve::contigs::ContigOrderer::setFilesFromAlignStart().

byte [][] org::gel::mauve::XMFAAlignment::getRange Genome  g,
long  lend,
long  rend
[inline]
 

Extracts columns from the sequence alignment containing the specified range of the specified sequence.

The returned alignment columns will contain gaps and any whitespace in the XMFA source (e.g. newlines)

Parameters:
g the genome whose sequence is of interest
lend The left end coordinate of the range to be extracted
rend The right end coordinate of the range to be extracted
Returns:
A set of alignment columns stored as an array of byte arrays indexed as [sequence][column]

Definition at line 521 of file XMFAAlignment.java.

References getLCB(), org::gel::mauve::Genome::getSourceIndex(), org::gel::mauve::Match::getStart(), gis_tree, intervals, readRawSequence(), reverse(), seq_count, and org::gel::mauve::tree::GISTree::seqPosToColumn().

Referenced by org::gel::mauve::SimilarityIndex::calculateIndex(), and org::gel::mauve::XmfaViewerModel::getSequenceRange().

LCB [] org::gel::mauve::XMFAAlignment::getSourceLcbList  )  [inline]
 

Definition at line 883 of file XMFAAlignment.java.

References source_lcb_list.

Referenced by org::gel::mauve::analysis::SnpExporter::countSubstitutions(), org::gel::mauve::analysis::SnpExporter::getSNPs(), SuppressWarnings(), and org::gel::mauve::analysis::SnpExporter::SuppressWarnings().

long org::gel::mauve::XMFAAlignment::globalToLCB long  position,
Genome  g,
int  ivI
[inline, package]
 

converts a global sequence coordinate to an LCB local coordinate, taking rev.

comp. into account

Definition at line 781 of file XMFAAlignment.java.

References intervals.

long org::gel::mauve::XMFAAlignment::LCBToGlobal long  position,
Genome  g,
int  ivI
[inline, package]
 

converts an LCB local coordinate to a global sequence coordinate, taking rev.

comp. into account

Definition at line 792 of file XMFAAlignment.java.

References intervals.

Referenced by getColumnCoordinates(), and getCoordinate().

byte [] org::gel::mauve::XMFAAlignment::readRawSequence int  ivI,
int  seqI,
long  left_col,
long  length
[inline]
 

Read sequence data (and any gap characters) from a file, filtering newlines column index starts at 0!!

Parameters:
ivI The interval to read
seqI The sequence to read
left_col Left column index (interval local coordinates)
length Length to read in columns (includes gaps)

Definition at line 633 of file XMFAAlignment.java.

References gis_tree.

Referenced by org::gel::mauve::assembly::AssemblyScorer::calculateMissingGC(), getRange(), org::gel::mauve::analysis::SnpExporter::getSNPs(), and org::gel::mauve::analysis::SnpExporter::SuppressWarnings().

long org::gel::mauve::XMFAAlignment::revCompify long  position,
Genome  g,
int  ivI
[inline, package]
 

Definition at line 767 of file XMFAAlignment.java.

References org::gel::mauve::Match::getLength(), org::gel::mauve::Match::getReverse(), org::gel::mauve::Match::getStart(), and intervals.

void org::gel::mauve::XMFAAlignment::reverse byte[]  byte_buf  )  [inline, package]
 

reverse entries in a byte array

Definition at line 589 of file XMFAAlignment.java.

Referenced by getRange().

void org::gel::mauve::XMFAAlignment::setFile RandomAccessFile  f  )  [inline]
 

Sets the file used as backing store for this alignment Call this method to set the file after reading a serialized XMFAAlignment.

Parameters:
f The xmfa file corresponding to this alignment

Definition at line 73 of file XMFAAlignment.java.

References xmfa_file.

Referenced by org::gel::mauve::XmfaViewerModel::init().

void org::gel::mauve::XMFAAlignment::setReference Genome  g  )  [inline]
 

Reorder the sequences to conform to the order given in new_order[].

Definition at line 873 of file XMFAAlignment.java.

References lcb_list, and org::gel::mauve::LCB::setReference().

Referenced by org::gel::mauve::XmfaViewerModel::referenceUpdated().

void org::gel::mauve::XMFAAlignment::setSourceLcbList LCB[]  source_lcb_list  )  [inline]
 

Definition at line 879 of file XMFAAlignment.java.

Referenced by SuppressWarnings().

org::gel::mauve::XMFAAlignment::SuppressWarnings "unchecked"   )  throws java.io.IOException [inline, package]
 

Constructor reads an XMFA alignment from an input file and indexes the location of alignment bounds.

< true when in the midst of reading gaps

Definition at line 81 of file XMFAAlignment.java.

References buffer_size, file_pos, org::gel::mauve::Match::getLength(), org::gel::mauve::tree::FileKey::getLength(), org::gel::mauve::tree::FileKey::getOffset(), getSourceLcbList(), org::gel::mauve::Match::getStart(), gis_tree, org::gel::mauve::tree::FileKey::incrementLength(), org::gel::mauve::tree::GISTree::insert(), intervals, lcb_list, org::gel::mauve::tree::GISTree::length(), metadata, newline_size, org::gel::mauve::tree::TreeStore::pruneArrays(), seq_count, org::gel::mauve::tree::FileKey::setFLength(), org::gel::mauve::Match::setLength(), org::gel::mauve::Match::setReverse(), setSourceLcbList(), org::gel::mauve::Match::setStart(), and xmfa_file.


Member Data Documentation

int org::gel::mauve::XMFAAlignment::buffer_size = 500000 [protected]
 

Definition at line 62 of file XMFAAlignment.java.

Referenced by SuppressWarnings().

String [] org::gel::mauve::XMFAAlignment::comments [protected]
 

Definition at line 50 of file XMFAAlignment.java.

Match [] org::gel::mauve::XMFAAlignment::file_pos [protected]
 

Definition at line 29 of file XMFAAlignment.java.

Referenced by SuppressWarnings().

GISTree [][] org::gel::mauve::XMFAAlignment::gis_tree [package]
 

Definition at line 57 of file XMFAAlignment.java.

Referenced by getRange(), readRawSequence(), and SuppressWarnings().

Match [] org::gel::mauve::XMFAAlignment::intervals [protected]
 

Definition at line 26 of file XMFAAlignment.java.

Referenced by getLCB(), getRange(), globalToLCB(), LCBToGlobal(), revCompify(), and SuppressWarnings().

LCB [] org::gel::mauve::XMFAAlignment::lcb_list [protected]
 

Definition at line 44 of file XMFAAlignment.java.

Referenced by org::gel::mauve::XmfaViewerModel::init(), setReference(), and SuppressWarnings().

int org::gel::mauve::XMFAAlignment::line_width = 80 [protected]
 

Definition at line 35 of file XMFAAlignment.java.

Properties org::gel::mauve::XMFAAlignment::metadata = new Properties ()
 

Definition at line 64 of file XMFAAlignment.java.

Referenced by org::gel::mauve::GenomeBuilder::buildGenome(), org::gel::mauve::backbone::BackboneListBuilder::getFileByKey(), and SuppressWarnings().

String [] org::gel::mauve::XMFAAlignment::names [protected]
 

Definition at line 53 of file XMFAAlignment.java.

int org::gel::mauve::XMFAAlignment::newline_size = 0 [protected]
 

Definition at line 32 of file XMFAAlignment.java.

Referenced by SuppressWarnings().

int org::gel::mauve::XMFAAlignment::seq_count = 0 [protected]
 

Definition at line 38 of file XMFAAlignment.java.

Referenced by filterGapsInOneSequence(), getColumnCoordinates(), getRange(), org::gel::mauve::XmfaViewerModel::init(), and SuppressWarnings().

long [] org::gel::mauve::XMFAAlignment::seq_length [protected]
 

Definition at line 41 of file XMFAAlignment.java.

Referenced by org::gel::mauve::GenomeBuilder::buildGenome().

final long org::gel::mauve::XMFAAlignment::serialVersionUID = 5 [static, package]
 

Versioning for serializations of this object.

Definition at line 20 of file XMFAAlignment.java.

LCB [] org::gel::mauve::XMFAAlignment::source_lcb_list [private]
 

Definition at line 47 of file XMFAAlignment.java.

Referenced by getSourceLcbList().

TreeStore org::gel::mauve::XMFAAlignment::ts = new TreeStore () [protected]
 

Definition at line 59 of file XMFAAlignment.java.

transient RandomAccessFile org::gel::mauve::XMFAAlignment::xmfa_file [protected]
 

Definition at line 23 of file XMFAAlignment.java.

Referenced by setFile(), and SuppressWarnings().


The documentation for this class was generated from the following file:
Generated on Mon Aug 19 06:03:48 2013 for Mauve by doxygen 1.3.6