Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
bird_pipeline_registry
RNAseq-quantif-pipeline
Commits
30c3015b
Commit
30c3015b
authored
Aug 06, 2021
by
Eric CHARPENTIER
🐍
Browse files
fixed bug that crashed the creation of the enrichment plot if no enrichment was found
parent
ced81cf7
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/annot.R
View file @
30c3015b
...
...
@@ -56,14 +56,18 @@ if(dim(data)[1]>10){
gene
=
names
(
geneList
)
ego
=
enrichGO
(
gene
=
gene
,
OrgDb
=
orgGO
,
ont
=
"ALL"
,
pAdjustMethod
=
"BH"
,
pvalueCutoff
=
0.01
,
qvalueCutoff
=
0.05
,
readable
=
TRUE
)
png
(
paste
(
paste
(
OUTDIR
,
comp
,
sep
=
"/"
),
"dotplotGO.png"
,
sep
=
"/"
),
width
=
1000
,
height
=
600
)
print
(
clusterProfiler
::
dotplot
(
ego
))
if
(
dim
(
ego
)[
1
]
!=
0
){
print
(
clusterProfiler
::
dotplot
(
ego
))
}
dev.off
()
write.table
(
ego
,
paste
(
paste
(
OUTDIR
,
comp
,
sep
=
"/"
),
"annotGo.tsv"
,
sep
=
"/"
),
sep
=
"\t"
,
row.names
=
F
,
quote
=
F
)
ekegg
=
enrichKEGG
(
gene
,
organism
=
as.character
(
orgKegg
),
keyType
=
"kegg"
,
pvalueCutoff
=
0.05
,
pAdjustMethod
=
"BH"
,
minGSSize
=
10
,
maxGSSize
=
500
,
qvalueCutoff
=
0.2
,
use_internal_data
=
FALSE
)
eKeggSymbol
=
setReadable
(
ekegg
,
orgGO
,
keyType
=
"ENTREZID"
)
png
(
paste
(
paste
(
OUTDIR
,
comp
,
sep
=
"/"
),
"dotplotKEGG.png"
,
sep
=
"/"
),
width
=
1000
,
height
=
600
)
print
(
clusterProfiler
::
dotplot
(
eKeggSymbol
))
if
(
dim
(
eKeggSymbol
)[
1
]
!=
0
){
print
(
clusterProfiler
::
dotplot
(
eKeggSymbol
))
}
dev.off
()
write.table
(
eKeggSymbol
,
paste
(
paste
(
OUTDIR
,
comp
,
sep
=
"/"
),
"annotKegg.tsv"
,
sep
=
"/"
),
sep
=
"\t"
,
row.names
=
F
,
quote
=
F
)
}
...
...
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