public class MultipleAlignmentTools extends Object
MultipleAlignment
.
Supported functions:
Constructor and Description |
---|
MultipleAlignmentTools() |
Modifier and Type | Method and Description |
---|---|
static Structure |
getAlignedStructure(List<Atom[]> atomArrays)
Get an artificial Structure containing a different model for every
input structure, so that the alignment result can be viewed in Jmol.
|
static Atom |
getAtomForSequencePosition(MultipleAlignment msa,
List<Integer> mapSeqToStruct,
int str,
int sequencePos)
Returns the Atom of the specified structure that is aligned in the
sequence alignment position specified.
|
static Matrix |
getAverageResidueDistances(List<Atom[]> transformed)
The average residue distance Matrix contains the average distance from
each residue to all other residues aligned with it.
|
static Matrix |
getAverageResidueDistances(MultipleAlignment msa)
The average residue distance Matrix contains the average distance from
each residue to all other residues aligned with it.
|
static int |
getBlockForSequencePosition(MultipleAlignment multAln,
List<Integer> mapSeqToStruct,
int sequencePos)
Returns the block number of a specified position in the sequence
alignment, given the mapping from structure to function.
|
static List<String> |
getBlockSequenceAlignment(MultipleAlignment ma)
Calculate the sequence alignment Strings for the alignment Blocks in an
alignment.
|
static List<String> |
getBlockSequenceAlignment(MultipleAlignment alignment,
List<Integer> mapSeqToStruct)
Calculate the sequence alignment Strings for the alignment Blocks in an
alignment.
|
static List<Integer> |
getCorePositions(Block block)
Calculate a List of alignment indicies that correspond to the core of a
Block, which means that all structures have a residue in that positon.
|
static org.forester.phylogeny.Phylogeny |
getHSDMTree(MultipleAlignment msta)
Calculate a phylogenetic tree of the MultipleAlignment using
dissimilarity scores (DS), based in SDM Substitution Matrix (ideal for
distantly related proteins, structure-derived) and the Neighbor Joining
algorithm from forester.
|
static org.forester.phylogeny.Phylogeny |
getKimuraTree(MultipleAlignment msta)
Calculate a phylogenetic tree of the MultipleAlignment using Kimura
distances and the Neighbor Joining algorithm from forester.
|
static Matrix |
getRMSDMatrix(MultipleAlignment msa)
Calculate the RMSD matrix of a MultipleAlignment, that is, entry (i,j) of
the matrix contains the RMSD between structures i and j.
|
static List<String> |
getSequenceAlignment(MultipleAlignment msa)
Calculate the sequence alignment Strings for the whole alignment.
|
static List<String> |
getSequenceAlignment(MultipleAlignment alignment,
List<Integer> mapSeqToStruct)
Calculate the sequence alignment Strings for the whole alignment.
|
static org.forester.phylogeny.Phylogeny |
getStructuralTree(MultipleAlignment msta)
Calculate a phylogenetic tree of the MultipleAlignment using RMSD
distances and the Neighbor Joining algorithm from forester.
|
static void |
sortBlocks(List<Block> blocks,
int sortedIndex)
Sort blocks so that the specified row is in sequential order.
|
static Structure |
toMultimodelStructure(MultipleAlignment multAln,
List<Atom[]> transformedAtoms) |
static MultipleSequenceAlignment<ProteinSequence,AminoAcidCompound> |
toProteinMSA(MultipleAlignment msta)
Convert a MultipleAlignment into a MultipleSequenceAlignment of AminoAcid
residues.
|
static List<Atom[]> |
transformAtoms(MultipleAlignment alignment)
Transforms atoms according to the superposition stored in the alignment.
|
public MultipleAlignmentTools()
public static List<String> getSequenceAlignment(MultipleAlignment alignment, List<Integer> mapSeqToStruct)
Blocks are concatenated in the order returned by
MultipleAlignment.getBlocks()
, so sequences may not be
sequential. Gaps are represented by '-'. Separation between different
Blocks is indicated by a gap in all positions, meaning that there is a
possible discontinuity.
alignment
- input MultipleAlignmentmapSeqToStruct
- provides a link from the sequence alignment position to the
structure alignment position. Specially designed for the GUI.
Has to be initialized previously and will be overwritten.public static List<String> getSequenceAlignment(MultipleAlignment msa)
Blocks are concatenated in the order returned by
MultipleAlignment.getBlocks()
, so sequences may not be
sequential. Gaps are represented by '-'. Separation between different
Blocks is indicated by a gap in all positions, meaning that there is a
possible discontinuity.
alignment
- input MultipleAlignmentpublic static List<String> getBlockSequenceAlignment(MultipleAlignment alignment, List<Integer> mapSeqToStruct)
getSequenceAlignment(MultipleAlignment)
.
Blocks are concatenated in the order returned by
MultipleAlignment.getBlocks()
, so sequences may not be
sequential. Gaps between blocks are omitted, while gaps within blocks are
represented by '-'. Separation between different Blocks is indicated by a
gap in all positions, meaning that there is something unaligned
inbetween.
alignment
- input MultipleAlignmentmapSeqToStruct
- provides a link from the sequence alignment position to the
structure alignment position. Specially designed for the GUI.
Has to be initialized previously and will be overwritten.public static List<String> getBlockSequenceAlignment(MultipleAlignment ma)
getSequenceAlignment(MultipleAlignment)
.
Blocks are concatenated in the order returned by
MultipleAlignment.getBlocks()
, so sequences may not be
sequential. Gaps between blocks are omitted, while gaps within blocks are
represented by '-'. Separation between different Blocks is indicated by a
gap in all positions, meaning that there is something unaligned
inbetween.
alignment
- input MultipleAlignmentpublic static Atom getAtomForSequencePosition(MultipleAlignment msa, List<Integer> mapSeqToStruct, int str, int sequencePos)
multAln
- the MultipleAlignment object from where the sequence alignment
has been generatedmapSeqToStruct
- the mapping between sequence and structure generated with the
sequence alignmentstr
- the structure index of the alignment (row)sequencePos
- the sequence alignment position (column)public static int getBlockForSequencePosition(MultipleAlignment multAln, List<Integer> mapSeqToStruct, int sequencePos)
multAln
- the MultipleAlignment object from where the sequence alignment
has been generated.mapSeqToStruct
- the mapping between sequence and structure generated with the
sequence alignmentsequencePos
- the position in the sequence alignment (column)public static Matrix getAverageResidueDistances(MultipleAlignment msa)
Complexity: T(n,l) = O(l*n^2), if n=number of structures and l=alignment length.
alignment
- MultipleAlignmentpublic static Matrix getAverageResidueDistances(List<Atom[]> transformed)
Complexity: T(n,l) = O(l*n^2), if n=number of structures and l=alignment length.
transformed
- List of Atom arrays containing only the aligned atoms of each
structure, or null if there is a gap.public static List<Atom[]> transformAtoms(MultipleAlignment alignment)
For each structure in the alignment, returns an atom for each representative atom in the aligned columns, omitting unaligned residues (i.e. an array of length alignment.length() ).
All blocks are concatenated together, so Atoms may not appear in the same order as in their parent structure. If the alignment blocks contain null residues (gaps), then the returned array will also contain null Atoms in the same positions.
alignment
- MultipleAlignmentpublic static List<Integer> getCorePositions(Block block)
block
- alignment Blockpublic static void sortBlocks(List<Block> blocks, int sortedIndex)
blocks
- List of blockssortedIndex
- Index of the row to be sortedpublic static MultipleSequenceAlignment<ProteinSequence,AminoAcidCompound> toProteinMSA(MultipleAlignment msta) throws CompoundNotFoundException
msta
- Multiple Structure AlignmentCompoundNotFoundException
public static Structure toMultimodelStructure(MultipleAlignment multAln, List<Atom[]> transformedAtoms) throws StructureException
StructureException
public static final Structure getAlignedStructure(List<Atom[]> atomArrays) throws StructureException
atomArrays
- an array of Atoms for every aligned structureStructureException
public static Matrix getRMSDMatrix(MultipleAlignment msa)
msa
- Multiple Structure Alignmentpublic static org.forester.phylogeny.Phylogeny getKimuraTree(MultipleAlignment msta) throws CompoundNotFoundException, IOException
msta
- MultipleAlignment of protein structuresCompoundNotFoundException
IOException
public static org.forester.phylogeny.Phylogeny getHSDMTree(MultipleAlignment msta) throws CompoundNotFoundException, IOException
msta
- MultipleAlignment of protein structuresCompoundNotFoundException
IOException
public static org.forester.phylogeny.Phylogeny getStructuralTree(MultipleAlignment msta)
msta
- MultipleAlignment of protein structuresCompoundNotFoundException
Copyright © 2000–2018 BioJava. All rights reserved.