Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
amunoz
structuralvariants_poc
Commits
a5daaac5
Commit
a5daaac5
authored
Jun 30, 2022
by
amunoz
Committed by
lrodrin
Jun 30, 2022
Browse files
Removed scripts from inputs and updated templates
parent
2a9af241
Changes
6
Hide whitespace changes
Inline
Side-by-side
structuralvariants/nextflow/modules/codex_filter.nf
View file @
a5daaac5
process CODEX_FILTER {
tag "codex filter"
tag
{
"codex filter"
}
input:
path input
...
...
@@ -10,10 +10,10 @@ process CODEX_FILTER {
val min_lratio
output:
path "*.bed"
, emit: output
path "*.bed"
script:
"""
sh $
script
$input $samples $min_len $max_len $min_lratio
sh $
projectDir/templates/codex_filter.sh
$input $samples $min_len $max_len $min_lratio
"""
}
\ No newline at end of file
structuralvariants/nextflow/modules/exomedepth_filter.nf
View file @
a5daaac5
process EXOMEDEPTH_FILTER {
tag "exomedepth filter"
tag
{
"exomedepth filter"
}
input:
path script
path input
path samples
val max_len
...
...
@@ -10,10 +9,10 @@ process EXOMEDEPTH_FILTER {
val min_bf
output:
path "*.bed"
, emit: output
path "*.bed"
script:
"""
sh $
script
$input $sample $min_len $max_len $min_bf
sh $
projectDir/templates/exomedepth_filter.sh
$input $sample $min_len $max_len $min_bf
"""
}
\ No newline at end of file
structuralvariants/nextflow/modules/manta_filter.nf
View file @
a5daaac5
...
...
@@ -2,7 +2,6 @@ process MANTA_FILTER {
tag { "manta filter" }
input:
path script
path input
path samples
val max_len
...
...
@@ -10,13 +9,13 @@ process MANTA_FILTER {
val min_q
output:
path "*"
, emit: output
path "*"
script:
"""
for i in $input
do
sh $
script
\$i $samples $min_len $max_len $min_q
sh $
projectDir/templates/manta_filter.sh
\$i $samples $min_len $max_len $min_q
done
"""
}
structuralvariants/nextflow/modules/merge_all.nf
View file @
a5daaac5
process MERGE_ALL {
tag "merge all"
tag
{
"merge all"
}
container 'quay.io/biocontainers/bedtools:2.26.0gx--he513fc3_4'
input:
path input
path script
output:
path "*.bed"
, emit: output
path "*.bed"
script:
"""
sh $script $input
"""
template "merge_all.sh"
}
\ No newline at end of file
structuralvariants/nextflow/subworkflows/final_filtering.nf
View file @
a5daaac5
...
...
@@ -14,11 +14,10 @@ include {
workflow SUB_FINAL_FILTERING {
take:
cnv_results
merge_all_script
main:
UNION( cnv_results )
MERGE( UNION.out
, merge_all_script
)
MERGE( UNION.out )
emit:
output = MERGE.out
...
...
structuralvariants/nextflow/templates/merge_all.sh
View file @
a5daaac5
#!/bin/bash
INPUT_FILE
=
$
1
OUTPUT_NAME
=
${
INPUT_FILE
/bed/sorted.merged.bed
}
OUTPUT_FILE
=
$(
echo
"
$OUTPUT_NAME
"
|
sed
"s/.*
\/
//"
)
INPUT_FILE
=
$
input
OUTPUT_NAME
=
\
$
{
INPUT_FILE/bed/sorted.merged.bed
}
OUTPUT_FILE
=
\
$
(
echo
"
\
$
OUTPUT_NAME"
|
sed
"s/.*
\
\
///"
)
for
i
in
$(
cat
$INPUT_FILE
|
sed
-e
"s/[[:space:]]
\+
/
\t
/g"
|
cut
-f4
|
sort
-u
)
# FIXME: remove sed -e "s/[[:space:]]\+/\t/g" try better solution
for
i
in
\
$
(
cat
\
$
INPUT_FILE |
sed
-e
"s/[[:space:]]
\
\
+/
\
\
t/g"
|
cut
-f4
|
sort
-u
)
do
for
j
in
"DEL"
"DUP"
do
grep
$i
$INPUT_FILE
|
grep
$j
|
sed
-e
"s/[[:space:]]
\+
/
\t
/g"
| bedtools
sort
| bedtools merge
-c
6,7
-o
collapse |
awk
-v
sample
=
$i
-v
type
=
$j
'{ \
print $1,$2,$3,sample,type,$4,$5}'
OFS
=
"
\t
"
done
>>
${
OUTPUT_FILE
}
grep
\
$
i
\
$
INPUT_FILE |
grep
\
$
j |
sed
-e
"s/[[:space:]]
\
\
+/
\
\
t/g"
| bedtools
sort
| bedtools merge
-c
6,7
-o
collapse |
awk
-v
sample
=
\
$
i
-v
type
=
\
$
j
'{ \
\
print
\
$1,
\
$2,
\
$3,sample,type,
\
$4,
\
$5}'
OFS
=
"
\
\
t"
done
>>
\
$
{
OUTPUT_FILE
}
done
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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