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
aafcda0d
Commit
aafcda0d
authored
Apr 28, 2015
by
Peter van 't Hof
Browse files
Added functions to get a value for all samples or libraries
parent
7eb3ecdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/summary/Summary.scala
View file @
aafcda0d
...
...
@@ -34,7 +34,27 @@ class Summary(file: File) {
ConfigUtils
.
getValueFromPath
(
map
,
"samples"
::
sampleId
::
path
.
toList
)
}
def
getSampleValues
(
path
:
String*
)
:
Map
[
String
,
Option
[
Any
]]
=
{
(
for
(
sample
<-
samples
)
yield
sample
->
getSampleValue
(
sample
,
path
:
_
*
)).
toMap
}
def
getSampleValues
(
function
:
(
Summary
,
String
)
=>
Option
[
Any
])
:
Map
[
String
,
Option
[
Any
]]
=
{
(
for
(
sample
<-
samples
)
yield
sample
->
function
(
this
,
sample
)).
toMap
}
def
getLibraryValue
(
sampleId
:
String
,
libId
:
String
,
path
:
String*
)
:
Option
[
Any
]
=
{
ConfigUtils
.
getValueFromPath
(
map
,
"samples"
::
sampleId
::
"libraries"
::
libId
::
path
.
toList
)
}
def
getLibraryValues
(
path
:
String*
)
:
Map
[(
String
,
String
)
,
Option
[
Any
]]
=
{
(
for
(
sample
<-
samples
;
lib
<-
libraries
.
getOrElse
(
sample
,
Set
()))
yield
{
(
sample
,
lib
)
->
getLibraryValue
(
sample
,
lib
,
path
:
_
*
)
}).
toMap
}
def
getLibraryValues
(
function
:
(
Summary
,
String
,
String
)
=>
Option
[
Any
])
:
Map
[(
String
,
String
)
,
Option
[
Any
]]
=
{
(
for
(
sample
<-
samples
;
lib
<-
libraries
.
getOrElse
(
sample
,
Set
()))
yield
{
(
sample
,
lib
)
->
function
(
this
,
sample
,
lib
)
}).
toMap
}
}
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