Skip to content
GitLab
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
211b5e18
Commit
211b5e18
authored
Dec 25, 2015
by
Peter van 't Hof
Browse files
Added merge output of qiimeClosed
parent
233d9a9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/Gears.scala
View file @
211b5e18
...
...
@@ -36,6 +36,16 @@ class Gears(val root: Configurable) extends QScript with MultiSampleQScript { qs
addSummaryJobs
()
}
def
qiimeClosedDir
:
Option
[
File
]
=
{
if
(
samples
.
values
.
flatMap
(
_
.
gs
.
qiimeClosed
).
nonEmpty
)
{
Some
(
new
File
(
outputDir
,
"qiime_closed_reference"
))
}
else
None
}
def
qiimeClosedOtuTable
:
Option
[
File
]
=
qiimeClosedDir
.
map
(
new
File
(
_
,
"otu_table.biom"
))
def
qiimeClosedOtuMap
:
Option
[
File
]
=
qiimeClosedDir
.
map
(
new
File
(
_
,
"otu_map.txt"
))
/**
* Method where the multisample jobs should be added, this will be executed only when running the -sample argument is not given.
*/
...
...
@@ -45,24 +55,20 @@ class Gears(val root: Configurable) extends QScript with MultiSampleQScript { qs
val
closedOtuMaps
=
gss
.
map
(
_
.
otuMap
)
require
(
closedOtuTables
.
size
==
closedOtuMaps
.
size
)
if
(
closedOtuTables
.
nonEmpty
)
{
val
closedDir
=
new
File
(
outputDir
,
"qiime_closed_reference"
)
val
closedOtuTable
=
new
File
(
closedDir
,
"otu_table.biom"
)
val
closedOtuMap
=
new
File
(
closedDir
,
"otu_map.txt"
)
if
(
closedOtuTables
.
size
>
1
)
{
val
mergeTables
=
new
MergeOtuTables
(
qscript
)
mergeTables
.
input
=
closedOtuTables
mergeTables
.
outputFile
=
c
losedOtuTable
mergeTables
.
outputFile
=
qiimeC
losedOtuTable
.
get
add
(
mergeTables
)
val
mergeMaps
=
new
MergeOtuMaps
(
qscript
)
mergeMaps
.
input
=
closedOtuMaps
mergeMaps
.
output
=
c
losedOtuMap
mergeMaps
.
output
=
qiimeC
losedOtuMap
.
get
add
(
mergeMaps
)
}
else
{
add
(
Ln
(
qscript
,
closedOtuMaps
.
head
,
c
losedOtuMap
))
add
(
Ln
(
qscript
,
closedOtuTables
.
head
,
c
losedOtuTable
))
add
(
Ln
(
qscript
,
closedOtuMaps
.
head
,
qiimeC
losedOtuMap
.
get
))
add
(
Ln
(
qscript
,
closedOtuTables
.
head
,
qiimeC
losedOtuTable
.
get
))
}
//TODO: Plots
...
...
@@ -149,7 +155,10 @@ class Gears(val root: Configurable) extends QScript with MultiSampleQScript { qs
def
summarySettings
:
Map
[
String
,
Any
]
=
Map
()
/** File to put in the summary for thie pipeline */
def
summaryFiles
:
Map
[
String
,
File
]
=
Map
()
def
summaryFiles
:
Map
[
String
,
File
]
=
(
qiimeClosedOtuTable
.
map
(
"qiime_closed_otu_table"
->
_
)
++
qiimeClosedOtuMap
.
map
(
"qiime_closed_otu_map"
->
_
)
).
toMap
}
object
Gears
extends
PipelineCommand
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment