|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectIMPACT.FileFormatConverter
public class FileFormatConverter
Implementation of functions to read/write several formats of MSA files. Accepts at most 2500 taxa, and 10000 sites (sequence size).
GUIFileFormatConverter
,
AlignmentEditor
Field Summary | |
---|---|
static java.lang.String[] |
CFILE_FORMATS
Collection of format names, only for ConTest. |
static java.lang.String |
CLUSTAL_F
CLUSTAL format name |
static char |
CLUSTAL_TYPE
CLUSTAL format type |
static java.lang.String |
DCSE_F
DCSE format name (discontinued). |
static int |
DESTINATION
Ouput files |
static java.lang.String |
FASTA_F
FASTA format name |
static char |
FASTA_TYPE
FASTA format type |
static java.lang.String[] |
FILEFORMATS
Collection of format names. |
static java.lang.String |
MASE_F
MASE format name |
static char |
MASE_TYPE
MASE format type |
static java.lang.String[] |
PHYLIP_FTYPES
PHYLIP Format types for either Interleaved or Sequential: Classic/Extended |
static char |
PHYLIP_TYPE
PHYLIP format type |
static java.lang.String |
PHYLIPG_F
PHYLIP GENERIC format name |
static java.lang.String |
PHYLIPI_F
PHYLIP INTERLEAVED format name |
static java.lang.String |
PHYLIPS_F
PHYLIP SEQUENTIAL format name |
static int |
SOURCE
Input files |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SOURCE
public static final int DESTINATION
public static final char FASTA_TYPE
public static final char MASE_TYPE
public static final char PHYLIP_TYPE
public static final char CLUSTAL_TYPE
public static final java.lang.String FASTA_F
public static final java.lang.String MASE_F
public static final java.lang.String PHYLIPG_F
public static final java.lang.String PHYLIPI_F
public static final java.lang.String PHYLIPS_F
public static final java.lang.String CLUSTAL_F
public static final java.lang.String DCSE_F
public static final java.lang.String[] FILEFORMATS
public static final java.lang.String[] CFILE_FORMATS
public static final java.lang.String[] PHYLIP_FTYPES
Constructor Detail |
---|
public 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.Method Detail |
---|
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
- public void setSequenceCount(int count)
count
- 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.PCLASSIC_F
,
PEXTENDED_F
public boolean readMSAfile()
public void writeMSAFile()
public int getMaxTaxaNameSize(java.lang.String[] taxa)
taxa
- array of taxa names.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |