Commit 8e18c15e authored by Peter van 't Hof's avatar Peter van 't Hof

Added docs

parent 452841d4
......@@ -39,7 +39,7 @@ object SamplesTsvToConfig extends ToolCommand {
}
opt[File]('o', "outputFile") unbounded () valueName "<file>" action { (x, c) =>
c.copy(outputFile = Some(x))
}
} text "When extension is .yml or .yaml output is in yaml format, otherwise in json. When not given output goes to stdout as yaml."
}
/** Executes SamplesTsvToJson */
......
# SamplesTsvToJson
# SamplesTsvToConfig
This tool enables a user to create a full sample sheet in JSON format, suitable for all our Queue pipelines, from TSV file(s).
This tool enables a user to create a full sample sheet in JSON format or YAML format, suitable for all our Queue pipelines, from TSV file(s).
The tool can be called as follows:
~~~ bash
biopet tool SamplesTsvToJson
biopet tool SamplesTsvToConfig
~~~
To open the help:
......@@ -24,40 +24,15 @@ Usage: SamplesTsvToJson [options]
-t <file> | --tagFiles <file>
-o <file> | --outputFile <file>
When extension is .yml or .yaml output is in yaml format, otherwise in json. When not given output goes to stdout as yaml.
~~~
A user provides a TAB separated file (TSV) with sample specific properties which are parsed into JSON format by the tool.
For example, a user wants to add certain properties to the description of a sample, such as the treatment a sample received. Then a TSV file with an extra column called treatment is provided.
The resulting JSON file will have the 'treatment' property in it as well. The order of the columns is not relevant to the end result
The resulting file will have the 'treatment' property in it as well. The order of the columns is not relevant to the end result
The tag files works the same only the value is prefixed in the key `tags`.
#### Example
~~~ json
{
"samples" : {
"Sample_ID_1" : {
"treatment" : "heatshock",
"libraries" : {
"Lib_ID_1" : {
"bam" : "MyFirst.bam"
}
}
},
"Sample_ID_2" : {
"treatment" : "heatshock",
"libraries" : {
"Lib_ID_2" : {
"bam" : "MySecond.bam"
}
}
}
}
}
~~~
#### Sample definition
To get the above example out of the tool one should provide 2 TSV files as follows:
......@@ -83,3 +58,45 @@ Basically anything you want to pass to your pipeline is possible.
| Sample_ID_1 | heatshock |
| Sample_ID_2 | heatshock |
#### Example
###### Yaml
~~~ yaml
samples:
Sample_ID_1:
treatment: heatshock
libraries:
Lib_ID_1:
bam: MyFirst.bam
Sample_ID_2:
treatment: heatshock
libraries:
Lib_ID_2:
bam: MySecond.bam
~~~
###### Json
~~~ json
{
"samples" : {
"Sample_ID_1" : {
"treatment" : "heatshock",
"libraries" : {
"Lib_ID_1" : {
"bam" : "MyFirst.bam"
}
}
},
"Sample_ID_2" : {
"treatment" : "heatshock",
"libraries" : {
"Lib_ID_2" : {
"bam" : "MySecond.bam"
}
}
}
}
}
~~~
......@@ -21,7 +21,7 @@ pages:
- Toucan (Annotation): 'pipelines/toucan.md'
- Tools:
- AnnotateVcfWithBed: 'tools/AnnotateVcfWithBed.md'
- SamplesTsvToJson: 'tools/SamplesTsvToJson.md'
- SamplesTsvToJson: 'tools/SamplesTsvToConfig.md'
- BedToInterval: 'tools/bedtointerval.md'
- BastyGenerateFasta: 'tools/BastyGenerateFasta.md'
- BedToInterval: 'tools/bedtointerval.md'
......
Markdown is supported
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