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
21f352a2
Commit
21f352a2
authored
8 years ago
by
Peter van 't Hof
Browse files
Options
Downloads
Patches
Plain Diff
Added contig based merge step
parent
cd1dbb8e
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/gwas-test/src/main/scala/nl/lumc/sasc/biopet/pipelines/gwastest/GwasTest.scala
+26
-17
26 additions, 17 deletions
...ala/nl/lumc/sasc/biopet/pipelines/gwastest/GwasTest.scala
with
26 additions
and
17 deletions
public/gwas-test/src/main/scala/nl/lumc/sasc/biopet/pipelines/gwastest/GwasTest.scala
+
26
−
17
View file @
21f352a2
...
@@ -60,25 +60,34 @@ class GwasTest(val root: Configurable) extends QScript with BiopetQScript with R
...
@@ -60,25 +60,34 @@ class GwasTest(val root: Configurable) extends QScript with BiopetQScript with R
/** Pipeline itself */
/** Pipeline itself */
def
biopetScript
()
:
Unit
=
{
def
biopetScript
()
:
Unit
=
{
val
vcfFile
:
File
=
inputVcf
.
getOrElse
{
val
(
vcfFile
,
chrVcfFiles
)
:
(
File
,
Map
[
String
,
File
])
=
inputVcf
.
map
((
_
,
Map
[
String
,
File
]()))
.
getOrElse
{
require
(
inputGens
.
nonEmpty
,
"No vcf file or gens files defined in config"
)
require
(
inputGens
.
nonEmpty
,
"No vcf file or gens files defined in config"
)
val
outputDirGens
=
new
File
(
outputDir
,
"gens_to_vcf"
)
val
outputDirGens
=
new
File
(
outputDir
,
"gens_to_vcf"
)
val
cv
=
new
CatVariants
(
this
)
val
cvTotal
=
new
CatVariants
(
this
)
cv
.
assumeSorted
=
true
cvTotal
.
assumeSorted
=
true
cv
.
outputFile
=
new
File
(
outputDirGens
,
"merge.gens.vcf.gz"
)
cvTotal
.
outputFile
=
new
File
(
outputDirGens
,
"merge.gens.vcf.gz"
)
inputGens
.
zipWithIndex
.
foreach
{
gen
=>
val
chrGens
=
inputGens
.
groupBy
(
_
.
contig
).
map
{
case
(
contig
,
gens
)
=>
val
gensToVcf
=
new
GensToVcf
(
this
)
val
cvChr
=
new
CatVariants
(
this
)
gensToVcf
.
inputGens
=
gen
.
_1
.
genotypes
cvChr
.
assumeSorted
=
true
gensToVcf
.
inputInfo
=
gen
.
_1
.
info
//cvChr.isIntermediate = true
gensToVcf
.
contig
=
gen
.
_1
.
contig
cvChr
.
outputFile
=
new
File
(
outputDirGens
,
s
"${contig}.merge.gens.vcf.gz"
)
gensToVcf
.
samplesFile
=
phenotypeFile
gens
.
zipWithIndex
.
foreach
{
gen
=>
gensToVcf
.
outputVcf
=
new
File
(
outputDirGens
,
gen
.
_1
.
genotypes
.
getName
+
s
".${gen._2}.vcf.gz"
)
val
gensToVcf
=
new
GensToVcf
(
this
)
gensToVcf
.
isIntermediate
=
true
gensToVcf
.
inputGens
=
gen
.
_1
.
genotypes
add
(
gensToVcf
)
gensToVcf
.
inputInfo
=
gen
.
_1
.
info
cv
.
inputFiles
:+=
gensToVcf
.
outputVcf
gensToVcf
.
contig
=
gen
.
_1
.
contig
gensToVcf
.
samplesFile
=
phenotypeFile
gensToVcf
.
outputVcf
=
new
File
(
outputDirGens
,
gen
.
_1
.
genotypes
.
getName
+
s
".${gen._2}.vcf.gz"
)
gensToVcf
.
isIntermediate
=
true
add
(
gensToVcf
)
cvChr
.
inputFiles
:+=
gensToVcf
.
outputVcf
}
add
(
cvChr
)
cvTotal
.
inputFiles
:+=
cvChr
.
outputFile
contig
->
cvChr
.
outputFile
}
}
add
(
cv
)
add
(
cv
Total
)
cv
.
outputFile
(
cv
Total
.
outputFile
,
Map
[
String
,
File
]())
}
}
val
snpTests
=
BedRecordList
.
fromReference
(
referenceFasta
())
val
snpTests
=
BedRecordList
.
fromReference
(
referenceFasta
())
...
@@ -91,7 +100,7 @@ class GwasTest(val root: Configurable) extends QScript with BiopetQScript with R
...
@@ -91,7 +100,7 @@ class GwasTest(val root: Configurable) extends QScript with BiopetQScript with R
bedFile
.
deleteOnExit
()
bedFile
.
deleteOnExit
()
val
sv
=
new
SelectVariants
(
this
)
val
sv
=
new
SelectVariants
(
this
)
sv
.
inputFiles
:+=
vcfFile
sv
.
inputFiles
:+=
chrVcfFiles
.
getOrElse
(
region
.
chr
,
vcfFile
)
sv
.
outputFile
=
new
File
(
regionDir
,
s
"${region.chr}-${region.start + 1}-${region.end}.vcf.gz"
)
sv
.
outputFile
=
new
File
(
regionDir
,
s
"${region.chr}-${region.start + 1}-${region.end}.vcf.gz"
)
sv
.
intervals
:+=
bedFile
sv
.
intervals
:+=
bedFile
sv
.
isIntermediate
=
true
sv
.
isIntermediate
=
true
...
...
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