Class ShellDelegatingBlat

  • All Implemented Interfaces:
    Blat

    public class ShellDelegatingBlat
    extends Object
    implements Blat
    Class to manage the gfServer and run BLAT searches. Delegates to the command-line shell to run blat.
    Author:
    pavlidis
    • Constructor Detail

      • ShellDelegatingBlat

        public ShellDelegatingBlat()
        Create a blat object with settings read from the config file.
      • ShellDelegatingBlat

        public ShellDelegatingBlat​(String host,
                                   int humanServerPort,
                                   String seqDir)
    • Method Detail

      • blatQuery

        public Collection<BlatResult> blatQuery​(BioSequence b)
                                         throws IOException
        Description copied from interface: Blat
        Run a BLAT search using the gfClient.
        Specified by:
        blatQuery in interface Blat
        Parameters:
        b - The genome is inferred from the Taxon held by the sequence.
        Returns:
        Collection of BlatResult objects.
        Throws:
        IOException - when there are IO problems.
      • blatQuery

        public Collection<BlatResult> blatQuery​(BioSequence b,
                                                Taxon taxon,
                                                boolean sensitive)
                                         throws IOException
        Description copied from interface: Blat
        Run a BLAT search using the gfClient.
        Specified by:
        blatQuery in interface Blat
        Parameters:
        b - The genome is inferred from the Taxon held by the sequence.
        taxon - taxon
        sensitive - if true use the more sensitive gfServer, if available.
        Returns:
        Collection of BlatResult objects.
        Throws:
        IOException - when there are IO problems.
      • blatQuery

        public Map<BioSequence,​Collection<BlatResult>> blatQuery​(Collection<BioSequence> sequences,
                                                                       boolean sensitive,
                                                                       Taxon taxon)
                                                                throws IOException
        Specified by:
        blatQuery in interface Blat
        Parameters:
        sequences - The genome is inferred from the Taxon held by the sequence.
        sensitive - if true use the more sensitive gfServer, if available.
        taxon - The taxon whose database will be searched.
        Returns:
        map of the input sequences to a corresponding collection of blat result(s)
        Throws:
        IOException - when there are IO problems.
      • getBlatScoreThreshold

        public double getBlatScoreThreshold()
        Specified by:
        getBlatScoreThreshold in interface Blat
        Returns:
        the blatScoreThreshold
      • setBlatScoreThreshold

        public void setBlatScoreThreshold​(double blatScoreThreshold)
        Specified by:
        setBlatScoreThreshold in interface Blat
        Parameters:
        blatScoreThreshold - the blatScoreThreshold to set
      • getGfClientExe

        public String getGfClientExe()
        Specified by:
        getGfClientExe in interface Blat
        Returns:
        Returns the gfClientExe.
      • getGfServerExe

        public String getGfServerExe()
        Specified by:
        getGfServerExe in interface Blat
        Returns:
        Returns the gfServerExe.
      • getHost

        public String getHost()
        Specified by:
        getHost in interface Blat
        Returns:
        Returns the host.
      • getHumanServerPort

        public int getHumanServerPort()
        Specified by:
        getHumanServerPort in interface Blat
        Returns:
        Returns the humanServerPort.
      • getMouseServerPort

        public int getMouseServerPort()
        Specified by:
        getMouseServerPort in interface Blat
        Returns:
        Returns the mouseServerPort.
      • getRatServerPort

        public int getRatServerPort()
        Specified by:
        getRatServerPort in interface Blat
        Returns:
        Returns the ratServerPort.
      • getSeqDir

        public String getSeqDir()
        Specified by:
        getSeqDir in interface Blat
        Returns:
        Returns the seqDir.
      • startServer

        public void startServer​(ShellDelegatingBlat.BlattableGenome genome,
                                int port)
                         throws IOException
        Description copied from interface: Blat
        Start the server, if the port isn't already being used. If the port is in use, we assume it is a gfServer.
        Specified by:
        startServer in interface Blat
        Parameters:
        genome - genome
        port - port
        Throws:
        IOException - when there are IO problems.
      • stopServer

        public void stopServer​(int port)
        Description copied from interface: Blat
        Stop the gfServer, if it was started by this.
        Specified by:
        stopServer in interface Blat
        Parameters:
        port - port