Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hub
ePeak
Commits
78d2e55e
Commit
78d2e55e
authored
Mar 23, 2022
by
Rachel LEGENDRE
Browse files
fix errors
parent
8dde433c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Snakefile
View file @
78d2e55e
...
...
@@ -513,6 +513,8 @@ if config["bamCoverage"]["do"]:
bamCoverage_options
=
config
[
'bamCoverage'
][
'options'
]
if
config
[
"bamCoverage"
][
"spike-in"
]
and
config
[
"design"
][
"spike"
]:
bamCoverage_scaleFactor
=
compute_scaling_factor_output
else
:
bamCoverage_scaleFactor
=
"{}/{{SAMPLE}}_{{REF}}_sort{}.bam"
.
format
(
biasedRegions_dir
,
biasedRegions
)
final_output
.
extend
(
expand
(
bamCoverage_output
,
SAMPLE
=
samples
,
REF
=
ref
,
allow_missing
=
True
))
include
:
os
.
path
.
join
(
RULES
,
"bamCoverage.rules"
)
...
...
config/config.yaml
View file @
78d2e55e
...
...
@@ -287,7 +287,7 @@ differential_analysis:
bamCoverage
:
do
:
yes
options
:
"
--binSize
10
--effectiveGenomeSize
2913022398
--normalizeUsing
RPGC"
spike-in
:
yes
spike-in
:
no
threads
:
4
#############################################################################
...
...
workflow/rules/bamCoverage.rules
View file @
78d2e55e
...
...
@@ -24,7 +24,8 @@
rule bamCoverage:
input:
bamCoverage_input
bam = bamCoverage_input,
scaleFactor = bamCoverage_scaleFactor
log:
out = bamCoverage_logs
output:
...
...
@@ -32,20 +33,19 @@ rule bamCoverage:
singularity:
"epeak.img"
params:
options = bamCoverage_options,
scaleFactor = bamCoverage_scaleFactor
options = bamCoverage_options
envmodules:
"deepTools"
threads:
config['bamCoverage']['threads']
shell:
"""
if [[ -s {
params
.scaleFactor} && {
params
.scaleFactor} == *"_scaleFactor.txt"* ]]
if [[ -s {
input
.scaleFactor} && {
input
.scaleFactor} == *"_scaleFactor.txt"* ]]
then
S=$(cat {
params
.scaleFactor})
bamCoverage --bam {input} --outFileName {output} {params.options} --scaleFactor $S --numberOfProcessors {threads} 2> {log.out}
S=$(cat {
input
.scaleFactor})
bamCoverage --bam {input
.bam
} --outFileName {output} {params.options} --scaleFactor $S --numberOfProcessors {threads} 2> {log.out}
else
bamCoverage --bam {input} --outFileName {output} {params.options} --numberOfProcessors {threads} 2> {log.out}
bamCoverage --bam {input
.bam
} --outFileName {output} {params.options} --numberOfProcessors {threads} 2> {log.out}
fi
"""
workflow/rules/bedgraph.rules
View file @
78d2e55e
...
...
@@ -44,7 +44,6 @@ rule bedgraph:
if [[ -s {input.scaleFactor} && {input.scaleFactor} == *"_scaleFactor.txt"* ]]
then
S=$(cat {input.scaleFactor})
echo $S
bedtools genomecov -bg -i $temp_file -g {params.genome} -scale $S > {output} 2> {log.out}
else
bedtools genomecov -bg -i $temp_file -g {params.genome} > {output} 2> {log.out}
...
...
Write
Preview
Supports
Markdown
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