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
3f119742
Commit
3f119742
authored
Nov 18, 2020
by
Eric CHARPENTIER
🐍
Browse files
fixed bugs for R4
parent
e404dd87
Changes
4
Show whitespace changes
Inline
Side-by-side
CONDA/srp.yml
View file @
3f119742
...
...
@@ -48,4 +48,5 @@ dependencies:
-
r-rcolorbrewer
-
r-tidyverse
-
r-ggiraph
-
r-r.utils
-
pandoc
SCRIPTS/DE/annot.R
View file @
3f119742
...
...
@@ -7,11 +7,7 @@ cond2=args[3]
org
=
args
[
4
]
corresFile
=
args
[
5
]
library
(
GO.db
)
library
(
GSEABase
)
library
(
clusterProfiler
)
library
(
DOSE
)
library
(
fgsea
)
makeGeneList
<-
function
(
data
,
org
){
pAdj
=
data
[,
"padj"
]
...
...
@@ -31,13 +27,13 @@ makeGeneList<-function(data,org){
return
(
geneList
)
}
corresIDorg
=
read.table
(
corresFile
,
header
=
T
,
row.names
=
1
)
corresIDorg
=
read.table
(
corresFile
,
header
=
T
,
row.names
=
1
,
stringsAsFactors
=
T
)
orgGO
=
as.character
(
corresIDorg
[
org
,
1
])
orgKegg
=
as.character
(
corresIDorg
[
org
,
2
])
comp
=
paste
(
cond1
,
cond2
,
sep
=
"__vs__"
)
data
=
read.csv
(
paste
(
paste
(
outputDir
,
comp
,
sep
=
"/"
),
"DEseqResFiltered.tsv"
,
sep
=
"/"
),
header
=
TRUE
,
sep
=
"\t"
)
data
=
read.csv
(
paste
(
paste
(
outputDir
,
comp
,
sep
=
"/"
),
"DEseqResFiltered.tsv"
,
sep
=
"/"
),
header
=
TRUE
,
sep
=
"\t"
,
stringsAsFactors
=
T
)
#Sys.setenv(http_proxy="http://cache.ha.univ-nantes.fr:3128")
#Sys.setenv(https_proxy="https://cache.ha.univ-nantes.fr:3128")
...
...
@@ -60,10 +56,10 @@ if(dim(data)[1]>10){
}
dataTot
=
read.csv
(
paste
(
paste
(
outputDir
,
comp
,
sep
=
"/"
),
"DEseqRes.tsv"
,
sep
=
"/"
),
header
=
TRUE
,
sep
=
"\t"
)
dataTot
=
read.csv
(
paste
(
paste
(
outputDir
,
comp
,
sep
=
"/"
),
"DEseqRes.tsv"
,
sep
=
"/"
),
header
=
TRUE
,
sep
=
"\t"
,
stringsAsFactors
=
T
)
geneListTot
=
makeGeneList
(
dataTot
,
orgGO
)
ego2
=
gseGO
(
geneList
=
geneListTot
,
OrgDb
=
orgGO
,
ont
=
"ALL"
,
nPerm
=
1000
,
minGSSize
=
20
,
maxGSSize
=
500
,
pvalueCutoff
=
1
,
verbose
=
FALSE
)
ego2
=
gseGO
(
geneList
=
geneListTot
,
OrgDb
=
get
(
orgGO
)
,
ont
=
"ALL"
,
nPerm
=
1000
,
minGSSize
=
20
,
maxGSSize
=
500
,
pvalueCutoff
=
1
,
verbose
=
FALSE
)
ego2Symbol
=
setReadable
(
ego2
,
orgGO
,
keyType
=
"ENTREZID"
)
kk2
=
gseKEGG
(
geneList
=
geneListTot
,
organism
=
as.character
(
orgKegg
),
nPerm
=
1000
,
minGSSize
=
2
,
pvalueCutoff
=
1
,
verbose
=
FALSE
)
...
...
SCRIPTS/DE/clusterHeatmap.R
View file @
3f119742
...
...
@@ -33,9 +33,9 @@ outputDir=opt$outdir
# usual functions
lire
<-
function
(
x
,
character
=
FALSE
){
if
(
character
){
d
<-
read.table
(
file
=
x
,
sep
=
"\t"
,
header
=
T
,
row.names
=
1
,
colClasses
=
"character"
,
quote
=
""
,
check.names
=
FALSE
)
d
<-
read.table
(
file
=
x
,
sep
=
"\t"
,
header
=
T
,
row.names
=
1
,
colClasses
=
"character"
,
quote
=
""
,
check.names
=
FALSE
,
stringsAsFactors
=
T
)
}
else
{
d
<-
read.table
(
file
=
x
,
sep
=
"\t"
,
header
=
T
,
row.names
=
1
,
quote
=
""
,
check.names
=
FALSE
)
d
<-
read.table
(
file
=
x
,
sep
=
"\t"
,
header
=
T
,
row.names
=
1
,
quote
=
""
,
check.names
=
FALSE
,
stringsAsFactors
=
T
)
}
return
(
d
)
}
...
...
SCRIPTS/DE/deAnalysis.R
View file @
3f119742
...
...
@@ -11,6 +11,8 @@ library("pvclust")
library
(
"circlize"
)
library
(
"RColorBrewer"
)
library
(
optparse
)
library
(
"R.utils"
)
# Getting options from command line
option_list
=
list
(
...
...
@@ -270,11 +272,11 @@ ecrire(rbind(DE.sel$up,DE.sel$down),paste(paste(outputDir,comp,sep="/"),"DEseqRe
#Volcano-plot
p
<-
ggvulcano
(
DE
,
cond1
,
cond2
,
logFCthreshold
=
logFCthreshold
,
AdjPValthreshold
=
AdjPValthreshold
,
GenesInFig
=
GenesInFig
)
htmlwidgets
::
saveWidget
(
girafe
(
ggobj
=
p
,
pointsize
=
12
,
width_svg
=
17
,
height_svg
=
14
),
paste
(
outputDir
,
comp
,
"Volcano-plot.html"
,
sep
=
"/"
),
selfcontained
=
FALSE
)
htmlwidgets
::
saveWidget
(
girafe
(
ggobj
=
p
,
pointsize
=
12
,
width_svg
=
17
,
height_svg
=
14
),
getAbsolutePath
(
paste
(
outputDir
,
comp
,
"Volcano-plot.html"
,
sep
=
"/"
)
)
,
selfcontained
=
FALSE
)
#MA-plot
p
<-
ggMA
(
DE
,
cond1
,
cond2
,
meanInCompThreshold
=
0.5
,
GenesInFig
=
GenesInFig
)
htmlwidgets
::
saveWidget
(
girafe
(
ggobj
=
p
,
pointsize
=
12
,
width_svg
=
17
,
height_svg
=
14
),
paste
(
outputDir
,
comp
,
"MA-plot.html"
,
sep
=
"/"
),
selfcontained
=
FALSE
)
htmlwidgets
::
saveWidget
(
girafe
(
ggobj
=
p
,
pointsize
=
12
,
width_svg
=
17
,
height_svg
=
14
),
getAbsolutePath
(
paste
(
outputDir
,
comp
,
"MA-plot.html"
,
sep
=
"/"
)
)
,
selfcontained
=
FALSE
)
#DE genes clustering
if
(
nrow
(
DE.sel
$
isDE
)
>=
10
){
...
...
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