Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
bird_pipeline_registry
SRP-pipeline
Commits
cfeb8245
Commit
cfeb8245
authored
Sep 16, 2020
by
Philippe BORDRON
Browse files
update the pipeline where it crashes
parent
53232846
Changes
4
Hide whitespace changes
Inline
Side-by-side
SCRIPTS/DE/clusterHeatmap.R
View file @
cfeb8245
...
...
@@ -15,7 +15,11 @@ option_list = list(
make_option
(
c
(
"-a"
,
"--sampleAbstract"
),
type
=
"character"
,
default
=
NULL
,
help
=
"sample abstract file path"
,
metavar
=
"character"
),
make_option
(
c
(
"-o"
,
"--outdir"
),
type
=
"character"
,
default
=
"."
,
help
=
"output directory [default= %default]"
,
metavar
=
"character"
)
help
=
"output directory [default= %default]"
,
metavar
=
"character"
),
make_option
(
c
(
"--ignore-plate-effect"
),
dest
=
"ignore_plate_effect"
,
action
=
"store_true"
,
default
=
FALSE
,
help
=
"Ignore plate effect if multiplate design [default= %default]"
),
make_option
(
c
(
"--ignore-batch-effect"
),
dest
=
"ignore_batch_effect"
,
action
=
"store_true"
,
default
=
FALSE
,
help
=
"Ignore batch effect [default= %default]"
)
);
opt_parser
=
OptionParser
(
option_list
=
option_list
);
...
...
@@ -86,9 +90,9 @@ nboot=30 #if bootsrap, number of bootstrap replications
sampleAnnot
<-
lire
(
sampleTable
)
# If column named "batchEffect" exists, apply batch correction
batchEffect
<-
FALSE
;
if
(
batchEffectCol
%in%
colnames
(
sampleAnnot
))
batchEffect
<-
TRUE
batchEffect
<-
FALSE
;
if
((
!
opt
$
ignore_batch_effect
)
&&
(
batchEffectCol
%in%
colnames
(
sampleAnnot
))
)
batchEffect
<-
TRUE
# If column named "plateBatch" exists, apply batch correction
plateBatch
<-
FALSE
;
if
(
plateBatchCol
%in%
colnames
(
sampleAnnot
))
plateBatch
<-
TRUE
plateBatch
<-
FALSE
;
if
((
!
opt
$
ignore_plate_effect
)
&&
(
plateBatchCol
%in%
colnames
(
sampleAnnot
))
)
plateBatch
<-
TRUE
if
(
batchEffect
||
plateBatch
){
exprDatT
=
lire
(
paste
(
outputDir
,
"/exprTransformedAdjusted.tsv"
,
sep
=
""
))
...
...
SCRIPTS/DE/normalization.R
View file @
cfeb8245
...
...
@@ -16,9 +16,7 @@ option_list = list(
make_option
(
c
(
"--ignore-plate-effect"
),
dest
=
"ignore_plate_effect"
,
action
=
"store_true"
,
default
=
FALSE
,
help
=
"Ignore plate effect if multiplate design [default= %default]"
),
make_option
(
c
(
"--ignore-batch-effect"
),
dest
=
"ignore_batch_effect"
,
action
=
"store_true"
,
default
=
FALSE
,
help
=
"Ignore batch effect [default= %default]"
),
make_option
(
c
(
"--ignore-all-factors"
),
dest
=
"ignore_factors"
,
action
=
"store_true"
,
default
=
FALSE
,
help
=
"Ignore all factors [default= %default]"
)
help
=
"Ignore batch effect [default= %default]"
)
);
opt_parser
=
OptionParser
(
option_list
=
option_list
);
...
...
@@ -53,9 +51,9 @@ exprDat<-lire(expressionData)
sampleAnnot
<-
lire
(
sampleTable
)
# If column named "batchEffect" exists, apply batch correction
batchEffect
<-
FALSE
;
if
((
!
(
opt
$
ignore_factors
||
opt
$
ignore_batch_effect
)
)
&&
(
batchEffectCol
%in%
colnames
(
sampleAnnot
)))
batchEffect
<-
TRUE
batchEffect
<-
FALSE
;
if
((
!
opt
$
ignore_batch_effect
)
&&
(
batchEffectCol
%in%
colnames
(
sampleAnnot
)))
batchEffect
<-
TRUE
# If column named "plateBatch" exists, apply batch correction
plateBatch
<-
FALSE
;
if
((
!
(
opt
$
ignore_factors
||
opt
$
ignore_plate_effect
)
)
&&
(
plateBatchCol
%in%
colnames
(
sampleAnnot
)))
plateBatch
<-
TRUE
plateBatch
<-
FALSE
;
if
((
!
opt
$
ignore_plate_effect
)
&&
(
plateBatchCol
%in%
colnames
(
sampleAnnot
)))
plateBatch
<-
TRUE
sampleAnnot
[,
condCol
]
<-
as.factor
(
as.character
(
sampleAnnot
[,
condCol
]))
exprDat
<-
exprDat
[,
c
(
rownames
(
sampleAnnot
))]
...
...
SCRIPTS/DE/qualityControl.R
View file @
cfeb8245
...
...
@@ -11,7 +11,11 @@ option_list = list(
make_option
(
c
(
"-s"
,
"--sampleTable"
),
type
=
"character"
,
default
=
NULL
,
help
=
"sample table file path"
,
metavar
=
"character"
),
make_option
(
c
(
"-o"
,
"--outdir"
),
type
=
"character"
,
default
=
"."
,
help
=
"output directory [default= %default]"
,
metavar
=
"character"
)
help
=
"output directory [default= %default]"
,
metavar
=
"character"
),
make_option
(
c
(
"--ignore-plate-effect"
),
dest
=
"ignore_plate_effect"
,
action
=
"store_true"
,
default
=
FALSE
,
help
=
"Ignore plate effect if multiplate design [default= %default]"
),
make_option
(
c
(
"--ignore-batch-effect"
),
dest
=
"ignore_batch_effect"
,
action
=
"store_true"
,
default
=
FALSE
,
help
=
"Ignore batch effect [default= %default]"
)
);
opt_parser
=
OptionParser
(
option_list
=
option_list
);
...
...
@@ -156,9 +160,9 @@ sampleAnnot<-lire(sampleTable)
# If column named "batchEffect" exists, apply batch correction
batchEffect
<-
FALSE
;
if
(
batchEffectCol
%in%
colnames
(
sampleAnnot
))
batchEffect
<-
TRUE
batchEffect
<-
FALSE
;
if
((
!
opt
$
ignore_batch_effect
)
&&
(
batchEffectCol
%in%
colnames
(
sampleAnnot
))
)
batchEffect
<-
TRUE
# If column named "plateBatch" exists, apply batch correction
plateBatch
<-
FALSE
;
if
(
plateBatchCol
%in%
colnames
(
sampleAnnot
))
plateBatch
<-
TRUE
plateBatch
<-
FALSE
;
if
((
!
opt
$
ignore_plate_effect
)
&&
(
plateBatchCol
%in%
colnames
(
sampleAnnot
))
)
plateBatch
<-
TRUE
acpT
<-
ACP
(
exprDatT
)
compo
=
length
(
which
(
acpT
$
percentVar
>
0.05
))
+1
...
...
SCRIPTS/common.smk
View file @
cfeb8245
...
...
@@ -107,10 +107,11 @@ rule deClusterHeatmap:
MAINDIR+"/{project}/"+config["de_folder"]+"/HeatmapCorPearson.png",
MAINDIR+"/{project}/"+config["de_folder"]+"/heatmap.RData"
params:
outdir = MAINDIR+"/{project}/"+config["de_folder"]
outdir = MAINDIR+"/{project}/"+config["de_folder"],
additional_params = lambda wildcards: config["comparisons"][wildcards.project].get("normalizationOptions", [])
shell:
"""
Rscript {wfbasedir}/SCRIPTS/DE/clusterHeatmap.R -e {input.expressionTable} -s {input.sampleTable} -a {input.sampleAbstract} -o {params.outdir}
Rscript {wfbasedir}/SCRIPTS/DE/clusterHeatmap.R -e {input.expressionTable} -s {input.sampleTable} -a {input.sampleAbstract} -o {params.outdir}
{params.additional_params}
"""
rule deQualityControls:
...
...
@@ -120,10 +121,11 @@ rule deQualityControls:
output:
MAINDIR+"/{project}/"+config["de_folder"]+"/PCA.png"
params:
outdir = MAINDIR+"/{project}/"+config["de_folder"]
outdir = MAINDIR+"/{project}/"+config["de_folder"],
additional_params = lambda wildcards: config["comparisons"][wildcards.project].get("normalizationOptions", [])
shell:
"""
Rscript {wfbasedir}/SCRIPTS/DE/qualityControl.R -e {input.expressionTable} -s {input.sampleTable} -o {params.outdir}
Rscript {wfbasedir}/SCRIPTS/DE/qualityControl.R -e {input.expressionTable} -s {input.sampleTable} -o {params.outdir}
{params.additional_params}
"""
rule deNormalization:
...
...
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