Class ShellDelegatingBlat
java.lang.Object
ubic.gemma.core.analysis.sequence.ShellDelegatingBlat
- All Implemented Interfaces:
Blat
Class to manage the gfServer and run BLAT searches. Delegates to the command-line shell to run blat.
- Author:
- pavlidis
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface ubic.gemma.core.analysis.sequence.Blat
DEFAULT_BLAT_SCORE_THRESHOLD
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a blat object with settings read from the config file. -
Method Summary
Modifier and TypeMethodDescriptionblatQuery
(Collection<BioSequence> sequences, boolean sensitive, Taxon taxon) blatQuery
(Collection<BioSequence> sequences, Taxon taxon) Run a BLAT search using the gfClient.blatQuery
(BioSequence b, Taxon taxon, boolean sensitive) Run a BLAT search using the gfClient.static ExternalDatabase
getSearchedGenome
(Taxon taxon) boolean
isServerReachable
(ShellDelegatingBlat.BlattableGenome genome, boolean sensitive) Check if the gfServer for a given genome is reachable.boolean
Check if the gfServer is running.processPsl
(InputStream inputStream, Taxon taxon) Process the output of a BLAT search in psl format.void
startServer
(ShellDelegatingBlat.BlattableGenome genome, boolean sensitive, boolean waitForFullInitialization) Start the server, if the port isn't already being used.void
Stop the gfServer, if it was started by this.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ubic.gemma.core.analysis.sequence.Blat
setBlatScoreThreshold
-
Constructor Details
-
ShellDelegatingBlat
public ShellDelegatingBlat()Create a blat object with settings read from the config file.
-
-
Method Details
-
getSearchedGenome
-
blatQuery
Description copied from interface:Blat
Run a BLAT search using the gfClient.- Specified by:
blatQuery
in interfaceBlat
- 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
Description copied from interface:Blat
Run a BLAT search using the gfClient.- Specified by:
blatQuery
in interfaceBlat
- Parameters:
b
- The genome is inferred from the Taxon held by the sequence.taxon
- taxonsensitive
- 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,List<BlatResult>> blatQuery(Collection<BioSequence> sequences, boolean sensitive, Taxon taxon) throws IOException - Specified by:
blatQuery
in interfaceBlat
- 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.
-
blatQuery
public Map<BioSequence,List<BlatResult>> blatQuery(Collection<BioSequence> sequences, Taxon taxon) throws IOException - Specified by:
blatQuery
in interfaceBlat
- Throws:
IOException
-
processPsl
Process the output of a BLAT search in psl format.- Parameters:
inputStream
- to the Blat output file in psl formattaxon
- taxon- Returns:
- processed results.
- Throws:
IOException
- when there are IO problems.
-
startServer
public void startServer(ShellDelegatingBlat.BlattableGenome genome, boolean sensitive, boolean waitForFullInitialization) throws IOException Start the server, if the port isn't already being used. If the port is in use, we assume it is a gfServer.- Parameters:
genome
- genomewaitForFullInitialization
- if true, wait for the server to be fully initialized before returning, otherwise return immediately after starting the server.- Throws:
IOException
- when there are IO problems.
-
isServerRunning
public boolean isServerRunning()Check if the gfServer is running. -
isServerReachable
Check if the gfServer for a given genome is reachable. -
stopServer
public void stopServer()Stop the gfServer, if it was started by this.
-