public class ProteinSequencesManager extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DNA_FOLDER
Name of the folder containing DNA translated files.
|
static String |
TEMP_FOLDER
Name of the folder containing temporary files.
|
static String |
UNIPROT_FOLDER
Name of the folder containing UniProt files.
|
static String |
USER_FOLDER
Name of the folder containing user FASTA files.
|
Constructor and Description |
---|
ProteinSequencesManager()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addFastaFile(File fastaFile,
SequenceInputType sequenceInputType,
WaitingHandler waitingHandler)
Adds a FASTA file to the working folder.
|
static String |
correctFastaName(String fastaName)
Corrects the name of the given FASTA file.
|
ArrayList<String> |
getDatabaseNames()
Returns the list of database names parsed from the working folder.
|
File |
getDnaFolder()
Returns the folder where DNA databases are stored.
|
FastaIndex |
getFastaIndex(String databaseName,
String version)
Returns the FASTA index of the given database name and version.
|
File |
getFolder(SequenceInputType sequenceInputType)
Returns the folder to be used for the given input type.
|
SequenceInputType |
getInputType(String databaseName)
Returns the input type of the given database.
|
File |
getTempFolder()
Returns the temporary folder.
|
File |
getUniprotFolder()
Returns the folder where UniProt databases are stored.
|
File |
getUserFolder()
Returns the folder where user databases are stored.
|
ArrayList<String> |
getVersionsForDb(String databaseName)
Returns the list of versions for the given database name as parsed from
the working folder.
|
public static final String TEMP_FOLDER
public static final String UNIPROT_FOLDER
public static final String USER_FOLDER
public static final String DNA_FOLDER
public ProteinSequencesManager()
public File getUniprotFolder()
public File getUserFolder()
public File getDnaFolder()
public void addFastaFile(File fastaFile, SequenceInputType sequenceInputType, WaitingHandler waitingHandler) throws IOException
fastaFile
- the FASTA file to addsequenceInputType
- the type of inputwaitingHandler
- a waiting handler displaying progress and allowing
canceling the operation.IOException
- exception thrown whenever an error occurred while
copying the file.public static String correctFastaName(String fastaName)
fastaName
- the name of the given FASTA filepublic File getFolder(SequenceInputType sequenceInputType)
sequenceInputType
- the type of inputpublic File getTempFolder()
public ArrayList<String> getDatabaseNames()
public ArrayList<String> getVersionsForDb(String databaseName)
databaseName
- the name of the database of interestpublic FastaIndex getFastaIndex(String databaseName, String version)
databaseName
- the name of the database of interestversion
- the version of the database of interestpublic SequenceInputType getInputType(String databaseName)
databaseName
- the name of the databaseCopyright © 2016. All rights reserved.