Class NCBIQBlastAlignmentProperties
- All Implemented Interfaces:
Serializable
,RemotePairwiseAlignmentProperties
Map
by adding several convenient parameter addition
methods. Other QBlast URL API parameters should be added using
setAlignmentOption(BlastAlignmentParameterEnum, String)
Required parameters are PROGRAM
and DATABASE
, other parameters are optional- Author:
- Sylvain Foisy, Diploide BioIT, Gediminas Rimsa
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAlignmentOption
(String key) This method forwards togetAlignmentOption(BlastAlignmentParameterEnum)
.Gets the value of specified parameter ornull
if it is not set.Gets parameters, which are currently setdouble
int
Returns the actual string for the GAPCOSTS parameter which is used to build the URLint
Returns the value for the GAP_CREATION parameter (first half of GAPCOSTS parameter)int
Returns the value for the gap extension parameter (second half of GAPCOSTS parameter)Returns the value of the specified substitution matrixint
int
Returns the value of the WORD_SIZE parameter used for this blast runvoid
Removes given parametervoid
setAlignementOption
(String key, String val) This method forwards tosetAlignmentOption(BlastAlignmentParameterEnum, String)
.void
Sets the value of specified parametervoid
setBlastAdvancedOptions
(String advancedOptions) This method is to be used if a request is to use non-default values at submission.void
setBlastDatabase
(String database) Sets the database to be used with blastallvoid
setBlastExpect
(double expect) Sets the EXPECT parameter to be use with blastallvoid
setBlastFromToPosition
(int start, int end) Sets the QUERY_FROM and QUERY_TO parameters to be use by blast.void
setBlastGapCosts
(int gapCreation, int gapExtension) Sets the GAPCOSTS parametervoid
setBlastMatrix
(BlastMatrixEnum matrix) Sets the value for the MATRIX parameter to use for blastallvoid
setBlastProgram
(BlastProgramEnum program) Sets the program to be used with blastallvoid
setBlastWordSize
(int word) Sets the WORD_SIZE parameter to be use with blastall
-
Constructor Details
-
NCBIQBlastAlignmentProperties
public NCBIQBlastAlignmentProperties()
-
-
Method Details
-
getAlignmentOption
This method forwards togetAlignmentOption(BlastAlignmentParameterEnum)
. Consider using it instead.- Specified by:
getAlignmentOption
in interfaceRemotePairwiseAlignmentProperties
- Parameters:
key
- :a String with the required key for this map.- Returns:
- a String with the value associated with this key
-
setAlignementOption
This method forwards tosetAlignmentOption(BlastAlignmentParameterEnum, String)
. Consider using it instead.- Specified by:
setAlignementOption
in interfaceRemotePairwiseAlignmentProperties
- Parameters:
key
- :the key use to designate the value to be storedval
- :the actual value matched to key
-
getAlignmentOptions
Gets parameters, which are currently set- Specified by:
getAlignmentOptions
in interfaceRemotePairwiseAlignmentProperties
- Returns:
- a
Set
with all keys held in this instance of the object
-
getAlignmentOption
Gets the value of specified parameter ornull
if it is not set. -
setAlignmentOption
Sets the value of specified parameter -
removeAlignmentOption
Removes given parameter -
getBlastProgram
- Returns:
- BlastProgramEnum used for blast run
-
setBlastProgram
Sets the program to be used with blastall- Parameters:
program
- : one of blastall programs
-
getBlastDatabase
- Returns:
- name of database used with blastall
-
setBlastDatabase
Sets the database to be used with blastallA list of available databases can be acquired by calling
NCBIQBlastService#printRemoteBlastInfo()
Blastall equivalent: -d
- Parameters:
db
- : a valid name to a NCBI blastable database
-
getBlastExpect
public double getBlastExpect()- Returns:
- double value of EXPECT parameter used for blast run
-
setBlastExpect
public void setBlastExpect(double expect) Sets the EXPECT parameter to be use with blastallExample: if you want a EXPECT of 1e-10, pass
Double.parseDouble("1e-10")
as a parameterBlastall equivalent: -e
- Parameters:
expect
- : a double value of EXPECT parameter
-
getBlastWordSize
public int getBlastWordSize()Returns the value of the WORD_SIZE parameter used for this blast run- Returns:
- int value of WORD_SIZE used by this search
- Throws:
IllegalArgumentException
- when program type is not set and program type is not supported
-
setBlastWordSize
public void setBlastWordSize(int word) Sets the WORD_SIZE parameter to be use with blastallWARNING!! At this point, the method does not verify the validity of your choice; for example, word size of greater than 5 with blastp returns error messages from QBlast. Word size range depends on the algorithm chosen.
More at https://www.ncbi.nlm.nih.gov/staff/tao/URLAPI/new/node74.html
Blastall equivalent: -W
- Parameters:
word
- : an int used to set WORD_SIZE
-
getBlastGapCreation
public int getBlastGapCreation()Returns the value for the GAP_CREATION parameter (first half of GAPCOSTS parameter)- Returns:
- an integer value for gap creation used by this search, -1 if not set or not a number
-
getBlastGapExtension
public int getBlastGapExtension()Returns the value for the gap extension parameter (second half of GAPCOSTS parameter)- Returns:
- an integer for the value for gap extension used by this search, -1 if not set or not a number
-
getBlastGapCosts
Returns the actual string for the GAPCOSTS parameter which is used to build the URL- Returns:
- the string representation of the GAPCOSTS parameter formatted for the URL
-
setBlastGapCosts
public void setBlastGapCosts(int gapCreation, int gapExtension) Sets the GAPCOSTS parameter- Parameters:
gapCreation
- integer to use as gap creation valuegapExtension
- integer to use as gap extension value
-
getBlastMatrix
Returns the value of the specified substitution matrix- Returns:
- matrix: the name of the specified substitution matrix
-
setBlastMatrix
Sets the value for the MATRIX parameter to use for blastallBlastall equivalent: -M
- Parameters:
matrix
- : a String to use as gap creation value- See Also:
-
setBlastFromToPosition
public void setBlastFromToPosition(int start, int end) Sets the QUERY_FROM and QUERY_TO parameters to be use by blast. Do not use if you want to use the whole sequence.
Blastall equivalent: -L- Parameters:
start
- QUERY_FROM parameterend
- QUERY_TO parameter
-
getBlastFromPosition
public int getBlastFromPosition()- Returns:
- an integer value for the QUERY_FROM parameter
- See Also:
-
getBlastToPosition
public int getBlastToPosition()- Returns:
- QUERY_TO parameter
- See Also:
-
setBlastAdvancedOptions
This method is to be used if a request is to use non-default values at submission. Useful for the following blastall parameters:- -r: integer to reward for match. Default = 1
- -q: negative integer for penalty to allow mismatch. Default = -3
- -y: dropoff for blast extensions in bits, using default if not specified. Default = 20 for blastn, 7 for all others (except megablast for which it is not applicable).
- -X: X dropoff value for gapped alignment, in bits. Default = 30 for blastn/megablast, 15 for all others.
- -Z: final X dropoff value for gapped alignement, in bits. Default = 50 for blastn, 25 for all others (except megablast for which it is not applicable)
- -P: equals 0 for multiple hits 1-pass, 1 for single hit 1-pass. Does not apply to blastn ou megablast.
- -A: multiple hits window size. Default = 0 (for single hit algorithm)
- -I: number of database sequences to save hits for. Default = 500
- -Y: effective length of the search space. Default = 0 (0 represents using the whole space)
- -z: a real specifying the effective length of the database to use. Default = 0 (0 represents the real size)
- -c: an integer representing pseudocount constant for PSI-BLAST. Default = 7
- -F: any filtering directive
WARNING!! This method is still very much in flux and might not work as expected...
You have to be aware that at no moment is there any error checking on the use of these parameters by this class.
- Parameters:
advancedOptions
- : a String with any number of optional parameters with an associated value.
-
getBlastAdvancedOptions
- Returns:
- the String with the advanced options
-