Class NCBIQBlastOutputProperties

java.lang.Object
org.biojava.nbio.ws.alignment.qblast.NCBIQBlastOutputProperties
All Implemented Interfaces:
Serializable, RemotePairwiseAlignmentOutputProperties

public class NCBIQBlastOutputProperties extends Object implements RemotePairwiseAlignmentOutputProperties
This class wraps a QBlast output parameter Map by adding several convenient parameter addition methods. Other QBlast URL API parameters should be added using setOutputOption(BlastOutputParameterEnum, String)
Author:
Sylvain Foisy, Diploide BioIT, Gediminas Rimsa
See Also:
  • Constructor Details

    • NCBIQBlastOutputProperties

      public NCBIQBlastOutputProperties()
      This constructor builds the parameters for the output of the GET command sent to the QBlast service with default values:
       FORMAT_TYPE = XML;
       ALIGNMENT_VIEW = Pairwise;
       DESCRIPTIONS = 100;
       ALIGNMENTS = 100;
       
  • Method Details

    • getOutputOption

      public String getOutputOption(String key)
      This method forwards to getOutputOption(BlastOutputParameterEnum). Consider using it instead.
      Specified by:
      getOutputOption in interface RemotePairwiseAlignmentOutputProperties
      Parameters:
      key - :a String with the required key for this map.
      Returns:
      a String with the value associated with this key
    • setOutputOption

      public void setOutputOption(String key, String val)
      This method forwards to setOutputOption(BlastOutputParameterEnum, String). Consider using it instead.
      Specified by:
      setOutputOption in interface RemotePairwiseAlignmentOutputProperties
      Parameters:
      key - :the key use to designate the value to be stored
      val - :the actual value matched to key
    • getOutputOption

      public String getOutputOption(BlastOutputParameterEnum key)
      Gets the value of specified parameter or null if it is not set
    • setOutputOption

      public void setOutputOption(BlastOutputParameterEnum key, String value)
      Sets the value of specified output parameter
    • getOutputOptions

      public Set<String> getOutputOptions()
      Gets output parameters, which are currently set
      Specified by:
      getOutputOptions in interface RemotePairwiseAlignmentOutputProperties
      Returns:
      a Set with all keys held in this instance of the object
    • removeOutputOption

      public void removeOutputOption(BlastOutputParameterEnum key)
      Removes given parameter
    • getOutputFormat

      public String getOutputFormat()
      Returns:
      stream output format - a String with the value of key FORMAT_TYPE
    • setOutputFormat

      public void setOutputFormat(BlastOutputFormatEnum formatType)
      Sets the stream output format to get from the QBlast service

      If HTML format is selected, also adds the following parameters (which are removed if another output format is chosen):

       NOHEADER = true;
       SHOW_OVERVIEW = false;
       SHOW_LINKOUT = false;
       
      Parameters:
      formatType - : one of the output format types defined in enum
    • getAlignmentOutputFormat

      public String getAlignmentOutputFormat()
      Returns:
      alignment output format - a String with the value of key ALIGNMENT_VIEW
    • setAlignmentOutputFormat

      public void setAlignmentOutputFormat(BlastOutputAlignmentFormatEnum alignmentFormat)
      Sets the alignment output format to get from the QBlast service
      Parameters:
      alignmentFormat - : one of available alignment types
    • getDescriptionNumber

      public int getDescriptionNumber()
      Returns:
      number of descriptions fetched - an int with the value of the key DESCRIPTIONS
    • setDescriptionNumber

      public void setDescriptionNumber(int number)
      Sets the number of descriptions to fetch
      Parameters:
      number - : an int with the required number of descriptions to fetch
    • getAlignmentNumber

      public int getAlignmentNumber()
      Returns:
      number of alignments fetched - an int with the value of the key ALIGNMENTS
    • setAlignmentNumber

      public void setAlignmentNumber(int number)
      Set the number of alignments to fetch
      Parameters:
      number - : an int with the required number of alignments to fetch