Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
biopet.biopet
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
biopet.biopet
Commits
e0985baf
Commit
e0985baf
authored
10 years ago
by
bow
Browse files
Options
Downloads
Patches
Plain Diff
Update docs in MergeTables
parent
aac693a1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/MergeTables.scala
+22
-1
22 additions, 1 deletion
...rc/main/scala/nl/lumc/sasc/biopet/tools/MergeTables.scala
with
22 additions
and
1 deletion
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/MergeTables.scala
+
22
−
1
View file @
e0985baf
...
...
@@ -24,25 +24,45 @@ import nl.lumc.sasc.biopet.core.ToolCommand
import
nl.lumc.sasc.biopet.core.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
/**
* Biopet wrapper for the [[MergeTables]] command line tool.
*
* @param root [[Configurable]] object
*/
class
MergeTables
(
val
root
:
Configurable
)
extends
BiopetJavaCommandLineFunction
{
javaMainClass
=
getClass
.
getName
override
val
defaultVmem
=
"5G"
/** List of input tabular files */
@Input
(
doc
=
"Input table files"
,
required
=
true
)
var
inputTables
:
List
[
File
]
=
List
.
empty
[
File
]
/** Output file */
@Output
(
doc
=
"Output merged table"
,
required
=
true
)
var
output
:
File
=
null
// TODO: should be List[Int] really
/** List of column indices to combine to make a unique identifier per row */
var
idColumnIndices
:
List
[
String
]
=
config
(
"id_column_indices"
,
default
=
List
(
"1"
))
/** Index of column from each tabular file containing the values to be put in the final merged table */
var
valueColumnIndex
:
Int
=
config
(
"value_column_index"
,
default
=
2
)
/** Name of the identifier column in the output file */
var
idColumnName
:
Option
[
String
]
=
config
(
"id_column_name"
)
/** Common file extension of all input files */
var
fileExtension
:
Option
[
String
]
=
config
(
"file_extension"
)
/** Number of header lines from each input file to ignore */
var
numHeaderLines
:
Option
[
Int
]
=
config
(
"num_header_lines"
)
/** String to use when a value is missing from an input file */
var
fallbackString
:
Option
[
String
]
=
config
(
"fallback_string"
)
/** Column delimiter of each input file (used for splitting into columns */
var
delimiter
:
Option
[
String
]
=
config
(
"delimiter"
)
// executed command line
...
...
@@ -197,7 +217,7 @@ object MergeTables extends ToolCommand {
opt
[
Char
](
'd'
,
"delimiter"
)
optional
()
action
{
(
x
,
c
)
=>
c
.
copy
(
delimiter
=
x
)
}
text
"The
string to use when a value for a feature is missing in one or more sample(s)
(default: '
-
')"
}
text
"The
character used for separating columns in the input files
(default: '
\\t
')"
arg
[
File
](
"<input_tables> ..."
)
unbounded
()
optional
()
action
{
(
x
,
c
)
=>
c
.
copy
(
inputTables
=
c
.
inputTables
:+
x
)
...
...
@@ -235,6 +255,7 @@ object MergeTables extends ToolCommand {
case
otherwise
=>
new
BufferedWriter
(
new
FileWriter
(
otherwise
))
}
/** Main entry point */
def
main
(
args
:
Array
[
String
])
:
Unit
=
{
val
commandArgs
:
Args
=
parseArgs
(
args
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment