public class AlignmentEditor
extends java.lang.Object
GUIAlignmentEditor,
MSATableModel,
MSAColumnColorRenderer| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TMPMSA_FILE
Temporary MSA file for input to PhyML.
|
| Constructor and Description |
|---|
AlignmentEditor(java.io.File file,
java.lang.String format)
Constructor method for Alignment Editor.
|
| Modifier and Type | Method and Description |
|---|---|
FileFormatConverter |
getFFC()
Get File Format Converter.
|
int |
getMaxTaxaNameSize()
Get maximum size for taxa name of input file read.
|
int |
getSequenceCount()
Get number of sequences for file loaded.
|
java.lang.String[][] |
getSequences()
Get alignment sequences.
|
int |
getSiteCount()
Get number of sites for file loaded.
|
java.lang.String[] |
getTableColNames()
Get column names for table.
These consist of numbered sites. |
java.lang.String[] |
getTableColNamesRev()
Get column names for table.
These consist of taxa names. |
java.lang.Object[][] |
getTableElements()
Get table values for table.
These consist of sequences presented in rows. |
java.lang.Object[][] |
getTableElementsRev()
Get table values for table.
These consist of sequences presented in columns. |
java.lang.String[] |
getTaxaNames()
Get sequence descriptions from alignment.
|
void |
initializeNormalView(boolean[] markedSeq)
Initialize normal view of data (by sequence).
View can be by sequence or by site, in terms of rows. |
void |
initializeOppositeView(boolean[] markedSites)
Initialize opposite view of data (by site).
View can be by sequence or by site, in terms of rows. |
boolean |
readMSAFile()
Read sequences from specified file and format.
File and Format instantiated through the constructor method. |
void |
removeCanceledTMPFls(Utilities util,
java.lang.String newTreeFile,
boolean selected)
Remove temporary files created for PhyML execution resulting from cancelation.
|
java.lang.String[] |
renamePhymlFiles(Utilities util,
java.lang.String newTreeFile,
boolean selected)
Rename PhyML files created on directory chosen to
the name specified by user.
|
void |
setSequences(java.lang.String[][] sequences)
Set new set of alignment sequences.
|
boolean |
setTableColNames(java.lang.String[] titles)
Use a different naming for table headers.
|
void |
setTaxaNames(java.lang.String[] seqtitles)
Set new sequence descriptions for alignment, only if the number of sequences is the same.
|
void |
writeMSAFile(boolean[] markedSeq,
boolean[] markedSites,
java.lang.String file,
java.lang.String format)
Write sequences to specified file and format after filtering.
|
public static final java.lang.String TMPMSA_FILE
public AlignmentEditor(java.io.File file,
java.lang.String format)
file - The file with MSA sequence.format - The format of file: FASTA, MASE, PHYLIP, CLUSTAL, DCSE.public int getSequenceCount()
public int getSiteCount()
public void initializeNormalView(boolean[] markedSeq)
markedSeq - values that set selection of sequences in the table.initializeOppositeView(boolean[] markedSites)public void initializeOppositeView(boolean[] markedSites)
markedSites - values that set selection of sequences in the table.initializeNormalView(boolean[] markedSeq)public java.lang.String[] getTableColNames()
MSATableModel,
getTableElements(),
initializeNormalView(boolean[] markedSeq)public boolean setTableColNames(java.lang.String[] titles)
titles - new table header.public java.lang.Object[][] getTableElements()
MSATableModel,
getTableColNames(),
initializeNormalView(boolean[] markedSeq)public java.lang.String[] getTableColNamesRev()
MSATableModel,
getTableElementsRev(),
initializeOppositeView(boolean[] markedSites)public java.lang.Object[][] getTableElementsRev()
MSATableModel,
getTableColNamesRev(),
initializeOppositeView(boolean[] markedSites)public int getMaxTaxaNameSize()
public java.lang.String[] getTaxaNames()
FileFormatConverter.getTaxaNames()public void setTaxaNames(java.lang.String[] seqtitles)
seqtitles - new descriptions for alignment.FileFormatConverter.setTaxaNames(java.lang.String[])public java.lang.String[][] getSequences()
public void setSequences(java.lang.String[][] sequences)
sequences - new matrix of alignment sequences.public FileFormatConverter getFFC()
public boolean readMSAFile()
writeMSAFile(boolean [] markedSeq, boolean[] markedSites, String file, String format),
FileFormatConverterpublic void writeMSAFile(boolean[] markedSeq,
boolean[] markedSites,
java.lang.String file,
java.lang.String format)
markedSeq - selected sequences to be written to file.markedSites - selected sites to be written to file.file - where to save the current table values. if null saves to currently opened file and format.format - file format to write if saving to different file; if format null, defaults to FASTA.readMSAFile(),
FileFormatConverterpublic java.lang.String[] renamePhymlFiles(Utilities util, java.lang.String newTreeFile, boolean selected)
util - utilities to access locations.newTreeFile - possibly chosen by the user.selected - true, if user chosed new tree name; false, otherwise.public void removeCanceledTMPFls(Utilities util, java.lang.String newTreeFile, boolean selected)
util - utilities to access locations.newTreeFile - possibly chosen by the user.selected - true, if user chosed new tree name; false, otherwise.