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
c5736387
Commit
c5736387
authored
8 years ago
by
Sander Bollen
Browse files
Options
Downloads
Patches
Plain Diff
stub for #384
parent
5a7b30eb
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
biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfWithVcf.scala
+20
-1
20 additions, 1 deletion
...src/main/scala/nl/lumc/sasc/biopet/tools/VcfWithVcf.scala
with
20 additions
and
1 deletion
biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfWithVcf.scala
+
20
−
1
View file @
c5736387
...
...
@@ -202,9 +202,28 @@ object VcfWithVcf extends ToolCommand {
}
case
FieldMethod
.
unique
=>
scalaListToJavaObjectArrayList
(
attribute
.
_2
.
distinct
)
case
_
=>
{
scalaListToJavaObjectArrayList
(
attribute
.
_2
)
header
.
getInfoHeaderLine
(
attribute
.
_1
).
getCountType
match
{
case
VCFHeaderLineCount
.
A
=>
scalaListToJavaObjectArrayList
(
numberA
(
record
,
record
,
attribute
.
_1
))
// TODO: get the reference reocrd in here
case
_
=>
scalaListToJavaObjectArrayList
(
attribute
.
_2
)
}
}
})
}).
make
()
}
/**
* Get the correct values from a field that has number=A
* @param referenceRecord the reference record
* @param annotateRecord the to-be-annotated record
* @param field the field to annotate
* @return
*/
def
numberA
(
referenceRecord
:
VariantContext
,
annotateRecord
:
VariantContext
,
field
:
String
)
:
List
[
Any
]
=
{
val
refValues
=
referenceRecord
.
getAttributeAsList
(
field
)
annotateRecord
.
getAlternateAlleles
.
map
(
x
=>
referenceRecord
.
getAlternateAlleles
.
indexOf
(
x
)).
map
(
x
=>
refValues
(
x
)).
toList
}
}
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