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.doublegetHost()intString[]intintString[]intintString[]intstatic ExternalDatabasegetSearchedGenome(Taxon taxon) intbooleanisServerReachable(ShellDelegatingBlat.BlattableGenome genome, boolean sensitive) Check if the gfServer for a given genome is reachable.booleanCheck if the gfServer is running.processPsl(InputStream inputStream, Taxon taxon) Process the output of a BLAT search in psl format.voidsetBlatScoreThreshold(double blatScoreThreshold) Set the blat score threshold to use.voidstartServer(ShellDelegatingBlat.BlattableGenome genome, boolean sensitive, boolean waitForFullInitialization) Start the server, if the port isn't already being used.voidStop the gfServer, if it was started by this.
-
Constructor Details
-
ShellDelegatingBlat
public ShellDelegatingBlat()Create a blat object with settings read from the config file.
-
-
Method Details
-
getSearchedGenome
-
blatQuery
Description copied from interface:BlatRun a BLAT search using the gfClient.- Specified by:
blatQueryin 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:BlatRun a BLAT search using the gfClient.- Specified by:
blatQueryin 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:
blatQueryin 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:
blatQueryin 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. -
getGfClientExe
-
getGfServerExe
-
getHost
-
getHumanSensitiveServerPort
public int getHumanSensitiveServerPort() -
getHumanSeqFiles
-
getHumanServerPort
public int getHumanServerPort() -
getMouseSensitiveServerPort
public int getMouseSensitiveServerPort() -
getMouseSeqFiles
-
getMouseServerPort
public int getMouseServerPort() -
getRatSensitiveServerPort
public int getRatSensitiveServerPort() -
getRatSeqFiles
-
getRatServerPort
public int getRatServerPort() -
getSeqDir
-
getTmpDir
-
getBlatScoreThreshold
public double getBlatScoreThreshold() -
getServerProcess
-
getServerHost
-
getServerPort
public int getServerPort() -
setBlatScoreThreshold
public void setBlatScoreThreshold(double blatScoreThreshold) Description copied from interface:BlatSet the blat score threshold to use.Defaults to
Blat.DEFAULT_BLAT_SCORE_THRESHOLD.- Specified by:
setBlatScoreThresholdin interfaceBlat
-