public class MultipleAlignmentWriter extends Object
MultipleAlignment
to various String outputs.
Supported formats: FASTA, FatCat, Aligned Residues, Transformation Matrices, XML, 3D format.
Constructor and Description |
---|
MultipleAlignmentWriter() |
Modifier and Type | Method and Description |
---|---|
static String |
to3DFormat(MultipleAlignment alignment,
int queryIndex,
int templateIndex)
Outputs a pairwise alignment in I-TASSER's 3D Format for target-template
alignment. http://zhanglab.ccmb.med.umich.edu/I-TASSER/option4.html
The format is closely related to a standard PDB file, but contains only
CA atoms and adds two columns for specifying the alignment:
ATOM 2001 CA MET 1 41.116 -30.727 6.866 129 THR
ATOM 2002 CA ALA 2 39.261 -27.408 6.496 130 ARG
ATOM 2003 CA ALA 3 35.665 -27.370 7.726 131 THR
ATOM 2004 CA ARG 4 32.662 -25.111 7.172 132 ARG
ATOM 2005 CA GLY 5 29.121 -25.194 8.602 133 ARG
Column 1 -30: Atom & Residue records of query sequence.
|
static String |
toAlignedResidues(MultipleAlignment multAln)
Converts the alignment to its simplest form: a list of groups of aligned
residues.
|
static String |
toFASTA(MultipleAlignment alignment)
Converts the
MultipleAlignment into a multiple sequence alignment
String in FASTA format. |
static String |
toFatCat(MultipleAlignment alignment)
Converts the
MultipleAlignment into a FatCat String format. |
static String |
toTransformMatrices(MultipleAlignment alignment)
Converts the transformation Matrices of the alignment into a String
output.
|
static String |
toXML(MultipleAlignmentEnsemble ensemble)
Converts all the information of a multiple alignment ensemble into an XML
String format.
|
public MultipleAlignmentWriter()
public static String toFASTA(MultipleAlignment alignment)
MultipleAlignment
into a multiple sequence alignment
String in FASTA format.alignment
- MultipleAlignmentMultipleAlignmentTools.getSequenceAlignment(MultipleAlignment)
public static String toFatCat(MultipleAlignment alignment)
MultipleAlignment
into a FatCat String format.
Includes summary information about the alignment in the top and a
multiple sequence alignment at the bottom.alignment
- MultipleAlignmentMultipleAlignmentTools.getSequenceAlignment(MultipleAlignment)
public static String toAlignedResidues(MultipleAlignment multAln)
52 A ALA 102 A VAL 154 A THR
Note that this format loses information about blocks.
multAln
- MultipleAlignment objectpublic static String toTransformMatrices(MultipleAlignment alignment)
afpChain
- public static String toXML(MultipleAlignmentEnsemble ensemble) throws IOException
ensemble
- the MultipleAlignmentEnsemble to convert.IOException
Helper methods for XML conversion
public static String to3DFormat(MultipleAlignment alignment, int queryIndex, int templateIndex) throws StructureException
The format is closely related to a standard PDB file, but contains only CA atoms and adds two columns for specifying the alignment:
ATOM 2001 CA MET 1 41.116 -30.727 6.866 129 THR ATOM 2002 CA ALA 2 39.261 -27.408 6.496 130 ARG ATOM 2003 CA ALA 3 35.665 -27.370 7.726 131 THR ATOM 2004 CA ARG 4 32.662 -25.111 7.172 132 ARG ATOM 2005 CA GLY 5 29.121 -25.194 8.602 133 ARG Column 1 -30: Atom & Residue records of query sequence. Column 31-54: Coordinates of atoms in query copied from corresponding atoms in template. Column 55-59: Corresponding residue number in template based on alignment Column 60-64: Corresponding residue name in template
Note that the output is a pairwise alignment. Only the first and second rows in the MultipleAlignment will be used, others ignored.
This method supports topology-independent alignments. The output will have sequence order matching the query, but include atoms from the template.
alignment
- A full multiple alignment between proteinsqueryIndex
- index of the query within the multiple alignmenttemplateIndex
- index of the template within the multiple alignmentStructureException
- If an error occurs parsing the alignment's structure namesCopyright © 2000–2019 BioJava. All rights reserved.