public class FileFormatConverter extends FileFormat
GUIFileFormatConverter,
AlignmentEditor,
FileFormat,
FileFormatReaderCFILE_FORMATS, CLUSTAL_F, CLUSTAL_TYPE, DCSE_F, DESTINATION, FASTA_F, FASTA_TYPE, FILEFORMATS, MASE_F, MASE_TYPE, msafileIn, msafileOut, PCLASSIC_F, PEXTENDED_F, PHYLIP_FTYPES, PHYLIP_TYPE, PHYLIPG_F, PHYLIPI_F, PHYLIPS_F, SOURCE| Constructor and Description |
|---|
FileFormatConverter()
Initialize File Converter.
|
FileFormatConverter(java.io.File fromfl,
java.lang.String fromfmt,
java.io.File tofl,
java.lang.String tofmt)
Build file converter with source and destination files.
|
FileFormatConverter(java.io.File file,
java.lang.String format,
int io)
Build file converter with file and format.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
convert_totmp(java.lang.String[] phy_options)
Creation of a temporary file, for phyml submission.
Temporary file must be of format Phylip (Interleaved or Sequential). If source file, is of any other format convert to either Interleaved or Sequential according to user choice in phyml options. |
boolean |
convert(java.io.File fromfl,
java.lang.String fromfmt,
java.io.File tofl,
java.lang.String tofmt)
Convert from file with format, to file with format.
|
int |
getMaxTaxaNameSize(java.lang.String[] taxa)
Get maximum size for given taxa names.
|
int |
getSequenceCount()
Get number of sequences, possibly if file loaded.
|
java.lang.String[][] |
getSequences()
Get sequences.
|
int |
getSiteCount()
Get number of sites, possibly if file loaded.
|
java.lang.String[] |
getTaxaNames()
Get taxa names.
|
boolean |
readMSAfile()
Read MSA file for instantiated source file and format.
|
void |
setPhylipFormatType(java.lang.String type)
Use phylip format type in read/write phylip files.
|
void |
setSequenceCount(int count)
Set number of sequences to value of count.
|
void |
setSequences(java.lang.String[][] msa)
Set sequences to msa value.
|
void |
setSiteCount(int count)
Set number of sites to value of count.
|
void |
setTaxaNames(java.lang.String[] names)
Set taxa names to names value.
|
void |
writeMSAFile()
Write to instantiated destination MSA file and format.
|
getBR, getBW, isWhite, setInputFile, setOutputFilepublic FileFormatConverter()
public FileFormatConverter(java.io.File file,
java.lang.String format,
int io)
file - to read or writeformat - file formatio - decide if these arguments are for read (input) or write (output) file.
Values: SOURCE , DESTINATION.public FileFormatConverter(java.io.File fromfl,
java.lang.String fromfmt,
java.io.File tofl,
java.lang.String tofmt)
fromfl - source file.fromfmt - source file format.tofl - destination file.tofmt - destination file format.public boolean convert(java.io.File fromfl,
java.lang.String fromfmt,
java.io.File tofl,
java.lang.String tofmt)
fromfl - source file.fromfmt - source file format.tofl - destination file.tofmt - destination file format.public boolean convert_totmp(java.lang.String[] phy_options)
phy_options - phyml options, choices made by the user.
Used to know phylip type when input format is not phylip.public int getSequenceCount()
public int getSiteCount()
public void setSiteCount(int count)
count - the number of sites.public void setSequenceCount(int count)
count - the number of sequences.public java.lang.String[][] getSequences()
public java.lang.String[] getTaxaNames()
public void setSequences(java.lang.String[][] msa)
msa - sequences pass to file converter.public void setTaxaNames(java.lang.String[] names)
names - of taxa to pass to file converter.public void setPhylipFormatType(java.lang.String type)
type - values are Classic / Extended.FileFormat.PCLASSIC_F,
FileFormat.PEXTENDED_Fpublic boolean readMSAfile()
public void writeMSAFile()
public int getMaxTaxaNameSize(java.lang.String[] taxa)
taxa - array of taxa names.