Class FastaParameters
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.io.biology.protein.FastaParameters
- All Implemented Interfaces:
Serializable
public class FastaParameters extends ExperimentObject
The parameters used to parse a FASTA file.
- Author:
- Marc Vaudel, Harald Barsnes
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description static String[]
DECOY_FLAGS
The decoy flags used to infer the FASTA parameters.static char[]
DECOY_SEPARATORS
The decoy separators used to infer the FASTA parameters. -
Constructor Summary
Constructors Constructor Description FastaParameters()
Empty default constructor. -
Method Summary
Modifier and Type Method Description boolean
equals(FastaParameters fastaParameters)
String
getDecoyFlag()
Returns the decoy flag.String
getShortDescription()
Returns a short description of the parameters.String
getTargetDecoyFileNameSuffix()
Returns the target-decoy file name suffix.static FastaParameters
inferParameters(String fastaFilePath, WaitingHandler waitingHandler)
Infers the parameters used to parse the file.boolean
isDecoySuffix()
Returns a boolean indicating whether the decoy flag is a suffix or a prefix.boolean
isSameAs(FastaParameters fastaParameters)
Returns a boolean indicating whether the parsing parameters are the same as the given parameters.boolean
isTargetDecoy()
Returns a boolean indicating whether the FASTA file should be processed as target-decoy or only target.void
setDecoyFlag(String decoyFlag)
Sets the decoy flag.void
setDecoySuffix(boolean decoySuffix)
Sets whether the decoy flag is a suffix or a prefix.void
setTargetDecoy(boolean targetDecoy)
Sets whether the FASTA file should be processed as target-decoy or only target.void
setTargetDecoyFileNameSuffix(String targetDecoyFileNameSuffix)
Set the target-decoy file name suffix.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Field Details
-
DECOY_FLAGS
The decoy flags used to infer the FASTA parameters. -
DECOY_SEPARATORS
public static final char[] DECOY_SEPARATORSThe decoy separators used to infer the FASTA parameters.
-
-
Constructor Details
-
FastaParameters
public FastaParameters()Empty default constructor.
-
-
Method Details
-
isTargetDecoy
public boolean isTargetDecoy()Returns a boolean indicating whether the FASTA file should be processed as target-decoy or only target.- Returns:
- a boolean indicating whether the FASTA file should be processed as target-decoy or only target
-
setTargetDecoy
public void setTargetDecoy(boolean targetDecoy)Sets whether the FASTA file should be processed as target-decoy or only target.- Parameters:
targetDecoy
- whether the FASTA file should be processed as target-decoy or only target
-
getDecoyFlag
Returns the decoy flag.- Returns:
- the decoy flag
-
setDecoyFlag
Sets the decoy flag.- Parameters:
decoyFlag
- the decoy flag
-
isDecoySuffix
public boolean isDecoySuffix()Returns a boolean indicating whether the decoy flag is a suffix or a prefix.- Returns:
- a boolean indicating whether the decoy flag is a suffix or a prefix
-
setDecoySuffix
public void setDecoySuffix(boolean decoySuffix)Sets whether the decoy flag is a suffix or a prefix.- Parameters:
decoySuffix
- whether the decoy flag is a suffix or a prefix
-
getTargetDecoyFileNameSuffix
Returns the target-decoy file name suffix.- Returns:
- the targetDecoyFileNameSuffix
-
setTargetDecoyFileNameSuffix
Set the target-decoy file name suffix.- Parameters:
targetDecoyFileNameSuffix
- the targetDecoyFileNameSuffix to set
-
isSameAs
Returns a boolean indicating whether the parsing parameters are the same as the given parameters.- Parameters:
fastaParameters
- the other parameters- Returns:
- a boolean indicating whether the parsing parameters are the same as the given parameters
-
inferParameters
public static FastaParameters inferParameters(String fastaFilePath, WaitingHandler waitingHandler) throws IOExceptionInfers the parameters used to parse the file.- Parameters:
fastaFilePath
- path to a FASTA filewaitingHandler
- a handler to allow canceling the import- Returns:
- returns FASTA parameters inferred from the file
- Throws:
IOException
- exception thrown if an error occurred while iterating the file
-
equals
-
getShortDescription
Returns a short description of the parameters.- Returns:
- a short description of the parameters
-