Skip to content

Instantly share code, notes, and snippets.

@tomjadams
Created August 22, 2008 03:16
Show Gist options
  • Save tomjadams/6729 to your computer and use it in GitHub Desktop.
Save tomjadams/6729 to your computer and use it in GitHub Desktop.
object CommandLineBlast {
lazy val blastHome = getenv("BLAST_HOME")
lazy val tmpDir = getProperty("java.io.tmpdir")
def blast(config: BlastConfiguration): AnalysisResult = {
if (blastHome == null) {
error("BLAST_HOME is not defined. It must point to the BLAST installation directory, e.g. BLAST_HOME=/opt/blast")
} else {
val executable = blastHome + "/bin/" + config.searchUtility.name
val c = command(executable)("-p", config.program.name)("-e 1.0")("-d ecoli.nt")("-i test.txt")("-o test.out")
val p = c.executeInDir(blastHome)
println(p.output)
BlastAnalysisResult("Huzzah!")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment