Class FastaParameters
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.io.biology.protein.FastaParameters
- All Implemented Interfaces:
Serializable
The parameters used to parse a FASTA file.
- Author:
- Marc Vaudel, Harald Barsnes
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]The decoy flags used to infer the FASTA parameters.static final char[]The decoy separators used to infer the FASTA parameters.Fields inherited from class com.compomics.util.experiment.personalization.ExperimentObject
NO_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(FastaParameters fastaParameters) Returns the decoy flag.Returns a short description of the parameters.Returns the target-decoy file name suffix.static FastaParametersinferParameters(String fastaFilePath, WaitingHandler waitingHandler) Infers the parameters used to parse the file.booleanReturns a boolean indicating whether the decoy flag is a suffix or a prefix.booleanisSameAs(FastaParameters fastaParameters) Returns a boolean indicating whether the parsing parameters are the same as the given parameters.booleanReturns a boolean indicating whether the FASTA file should be processed as target-decoy or only target.voidsetDecoyFlag(String decoyFlag) Sets the decoy flag.voidsetDecoySuffix(boolean decoySuffix) Sets whether the decoy flag is a suffix or a prefix.voidsetTargetDecoy(boolean targetDecoy) Sets whether the FASTA file should be processed as target-decoy or only target.voidsetTargetDecoyFileNameSuffix(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 IOException Infers 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
-