Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
f4bd70ff
Commit
f4bd70ff
authored
Mar 23, 2015
by
bow
Browse files
Use FullVersion throughout
parent
c30670ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/BiopetExecutable.scala
View file @
f4bd70ff
...
...
@@ -16,11 +16,13 @@
package
nl.lumc.sasc.biopet.core
import
java.io.
{
PrintWriter
,
StringWriter
}
import
java.util.Properties
import
nl.lumc.sasc.biopet.core.BiopetExecutable._
import
org.apache.log4j.Logger
import
scala.io.Source
import
org.apache.log4j.Logger
import
nl.lumc.sasc.biopet.
{
FullVersion
,
LastCommitHash
}
import
nl.lumc.sasc.biopet.core.BiopetExecutable._
trait
BiopetExecutable
extends
Logging
{
def
pipelines
:
List
[
MainCommand
]
...
...
@@ -59,7 +61,7 @@ trait BiopetExecutable extends Logging {
| - license
|
|Questions or comments? Email sasc@lumc.nl or check out the project page at https://git.lumc.nl/biopet/biopet.git
"""
.
stripMargin
.
format
(
modules
.
keys
.
mkString
(
","
),
get
Version
,
usage
)
"""
.
stripMargin
.
format
(
modules
.
keys
.
mkString
(
","
),
Full
Version
,
usage
)
}
def
checkModule
(
module
:
String
)
{
...
...
@@ -81,7 +83,7 @@ trait BiopetExecutable extends Logging {
args
match
{
case
Array
(
"version"
)
=>
{
println
(
"version: "
+
get
Version
)
println
(
"version: "
+
Full
Version
)
}
case
Array
(
"license"
)
=>
{
println
(
getLicense
)
...
...
@@ -118,30 +120,16 @@ trait BiopetExecutable extends Logging {
}
}
def
checkDirtyBuild
(
logger
:
Logger
)
{
val
prop
=
new
Properties
()
prop
.
load
(
getClass
.
getClassLoader
.
getResourceAsStream
(
"git.properties"
))
val
describeShort
=
prop
.
getProperty
(
"git.commit.id.describe-short"
)
if
(
describeShort
.
endsWith
(
"-dirty"
))
{
def
checkDirtyBuild
(
logger
:
Logger
)
:
Unit
=
if
(
LastCommitHash
.
endsWith
(
"-dirty"
))
{
logger
.
warn
(
"**********************************************************"
)
logger
.
warn
(
"* This JAR was built while there are uncommited changes. *"
)
logger
.
warn
(
"* Reproducible results are *not* guaranteed. *"
)
logger
.
warn
(
"**********************************************************"
)
}
}
}
object
BiopetExecutable
{
def
getVersion
=
{
getClass
.
getPackage
.
getImplementationVersion
+
" ("
+
getCommitHash
+
")"
}
def
getCommitHash
=
{
val
prop
=
new
Properties
()
prop
.
load
(
getClass
.
getClassLoader
.
getResourceAsStream
(
"git.properties"
))
prop
.
getProperty
(
"git.commit.id.abbrev"
)
}
def
getLicense
:
String
=
{
val
stream
=
getClass
.
getClassLoader
.
getResourceAsStream
(
"nl/lumc/sasc/biopet/License.txt"
)
Source
.
fromInputStream
(
stream
).
getLines
().
mkString
(
"\n"
,
"\n"
,
"\n"
)
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/ToolCommand.scala
View file @
f4bd70ff
...
...
@@ -15,6 +15,8 @@
*/
package
nl.lumc.sasc.biopet.core
import
nl.lumc.sasc.biopet.FullVersion
/**
* Trait for biopet tools, sets some default args
*/
...
...
@@ -45,7 +47,7 @@ trait ToolCommand extends MainCommand with Logging {
sys
.
exit
(
1
)
}
text
(
"Print usage"
)
opt
[
Unit
](
'v'
,
"version"
)
foreach
{
_
=>
System
.
err
.
println
(
"Version: "
+
BiopetExecutable
.
get
Version
)
System
.
err
.
println
(
"Version: "
+
Full
Version
)
sys
.
exit
(
1
)
}
text
(
"Print version"
)
}
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/workaround/BiopetQCommandLine.scala
View file @
f4bd70ff
...
...
@@ -45,23 +45,24 @@
package
nl.lumc.sasc.biopet.core.workaround
import
java.io.File
import
collection.JavaConversions._
import
java.io.
{
File
,
FileOutputStream
}
import
java.net.URL
import
java.util.
{
ResourceBundle
,
Arrays
}
import
org.apache.commons.io.FilenameUtils
import
org.broadinstitute.gatk.utils.commandline._
import
org.broadinstitute.gatk.queue.util._
import
org.broadinstitute.gatk.queue.
{
QCommandPlugin
,
QScript
,
QScriptManager
}
import
org.broadinstitute.gatk.queue.util.
{
Logging
=>
GatkLogging
}
import
org.broadinstitute.gatk.queue.engine.
{
QStatusMessenger
,
QGraphSettings
,
QGraph
}
import
collection.JavaConversions._
import
org.broadinstitute.gatk.utils.classloader.PluginManager
import
org.broadinstitute.gatk.utils.exceptions.UserException
import
org.broadinstitute.gatk.utils.io.IOUtils
import
org.broadinstitute.gatk.utils.help.ApplicationDetails
import
java.io.FileOutputStream
import
java.net.URL
import
java.util.
{
ResourceBundle
,
Arrays
}
import
org.broadinstitute.gatk.utils.text.TextFormattingUtils
import
org.apache.commons.io.FilenameUtils
import
nl.lumc.sasc.biopet.
core.BiopetExecutable
import
nl.lumc.sasc.biopet.
FullVersion
/**
* Entry point of Queue. Compiles and runs QScripts passed in to the command line.
...
...
@@ -291,7 +292,7 @@ class BiopetQCommandLine extends CommandLineProgram with Logging {
}
private
def
createQueueHeader
()
:
Seq
[
String
]
=
{
Seq
(
"Biopet version: "
+
BiopetExecutable
.
get
Version
,
""
,
Seq
(
"Biopet version: "
+
Full
Version
,
""
,
"Based on GATK Queue"
,
// String.format("Queue v%s, Compiled %s", getQueueVersion, getBuildTimestamp),
"Copyright (c) 2012 The Broad Institute"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment