Commit b443f31f authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Changed name to commandName

parent 8ba5ac3e
......@@ -17,7 +17,8 @@ object BiopetExecutable {
nl.lumc.sasc.biopet.pipelines.sage.Sage,
nl.lumc.sasc.biopet.pipelines.basty.Basty),
"tool" -> List(
nl.lumc.sasc.biopet.core.apps.WipeReads)
nl.lumc.sasc.biopet.core.apps.WipeReads,
nl.lumc.sasc.biopet.core.apps.BiopetFlagstat)
)
/**
......@@ -26,7 +27,7 @@ object BiopetExecutable {
def main(args: Array[String]): Unit = {
def toBulletedList(m: List[MainCommand], kind: String = "", bullet: String = "-") =
"Available %ss:\n ".format(kind) + bullet + " " + m.map(x => x.name).sorted.mkString("\n " + bullet + " ")
"Available %ss:\n ".format(kind) + bullet + " " + m.map(x => x.commandName).sorted.mkString("\n " + bullet + " ")
def usage(module:String = null): String = {
if (module != null) checkModule(module)
......@@ -53,7 +54,7 @@ object BiopetExecutable {
def getCommand(module:String, name:String) : MainCommand = {
checkModule(module)
val command = modules(module).find(p => p.name.toLowerCase == name.toLowerCase)
val command = modules(module).find(p => p.commandName.toLowerCase == name.toLowerCase)
if (command == None) {
System.err.println(s"ERROR: command '$name' does not exist in module '$module'\n" + usage(module))
System.exit(1)
......
......@@ -2,7 +2,7 @@ package nl.lumc.sasc.biopet.core
trait MainCommand {
lazy val name = this.getClass.getSimpleName
lazy val commandName = this.getClass.getSimpleName
.split("\\$").last
def main(args: Array[String])
......
......@@ -460,9 +460,9 @@ object WipeReads extends MainCommand {
val usage: String =
s"""
|Usage: java -jar BiopetFramework.jar tool $name [options] -I input -l regions -o output
|Usage: java -jar BiopetFramework.jar tool $commandName [options] -I input -l regions -o output
|
|$name - Tool for reads removal from an indexed BAM file
|$commandName - Tool for reads removal from an indexed BAM file
|
|Positional arguments:
| -I,--inputBAM Input BAM file, must be indexed with
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment