Class NCBIQBlastAlignmentProperties

    • Method Detail

      • setBlastProgram

        public void setBlastProgram​(BlastProgramEnum program)
        Sets the program to be used with blastall
        Parameters:
        program - : one of blastall programs
      • setBlastDatabase

        public void setBlastDatabase​(String database)
        Sets the database to be used with blastall

        A 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 blastall

        Example: if you want a EXPECT of 1e-10, pass Double.parseDouble("1e-10") as a parameter

        Blastall 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 blastall

        WARNING!! 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

        public String 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 value
        gapExtension - integer to use as gap extension value
      • getBlastMatrix

        public String getBlastMatrix()
        Returns the value of the specified substitution matrix
        Returns:
        matrix: the name of the specified substitution matrix
      • setBlastMatrix

        public void setBlastMatrix​(BlastMatrixEnum matrix)
        Sets the value for the MATRIX parameter to use for blastall

        Blastall equivalent: -M

        Parameters:
        matrix - : a String to use as gap creation value
        See Also:
        BlastMatrixEnum
      • 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 parameter
        end - QUERY_TO parameter
      • setBlastAdvancedOptions

        public void setBlastAdvancedOptions​(String advancedOptions)
        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.