Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TDD_MAPKi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LBMC
ReGArDS
TDD_MAPKi
Commits
7ba444b0
Commit
7ba444b0
authored
2 years ago
by
nfontrod
Browse files
Options
Downloads
Patches
Plain Diff
src/06_compute_tdd_index.R: add padj in TDD_correlation_table
parent
38a6e219
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/06_compute_tdd_index.R
+6
-0
6 additions, 0 deletions
src/06_compute_tdd_index.R
with
6 additions
and
0 deletions
src/06_compute_tdd_index.R
+
6
−
0
View file @
7ba444b0
...
@@ -485,13 +485,18 @@ prepare_df_for_cor <- function(mean_gene_count = 10, ercc = F,
...
@@ -485,13 +485,18 @@ prepare_df_for_cor <- function(mean_gene_count = 10, ercc = F,
clear
=
FALSE
,
# If TRUE, clears the bar when finish
clear
=
FALSE
,
# If TRUE, clears the bar when finish
width
=
100
width
=
100
)
# Width of the progress bar
)
# Width of the progress bar
ptotv
<-
NULL
for
(
gn
in
genes
)
{
for
(
gn
in
genes
)
{
pb
$
tick
()
pb
$
tick
()
tmp
<-
tdd_full
%>%
filter
(
gene
==
gn
)
tmp
<-
tdd_full
%>%
filter
(
gene
==
gn
)
fit
<-
lm
(
value
~
condition
+
time_point
+
replicate
,
data
=
tmp
)
fit
<-
lm
(
value
~
condition
+
time_point
+
replicate
,
data
=
tmp
)
p_val
<-
summary
(
fit
)
$
coefficients
[
"conditionDMSO_TDD"
,
"Pr(>|t|)"
]
p_val
<-
summary
(
fit
)
$
coefficients
[
"conditionDMSO_TDD"
,
"Pr(>|t|)"
]
tdd_mean
[
tdd_mean
$
gene
==
gn
,
"p_value"
]
<-
p_val
tdd_mean
[
tdd_mean
$
gene
==
gn
,
"p_value"
]
<-
p_val
ptotv
<-
c
(
ptotv
,
p_val
)
}
}
padjs
<-
p.adjust
(
ptotv
,
method
=
"fdr"
)
tmp_table
<-
tibble
(
gene
=
genes
,
padj
=
padjs
)
tdd_mean
<-
tdd_mean
%>%
left_join
(
tmp_table
,
by
=
"gene"
)
tdd_full
<-
tdd_mean
%>%
arrange
(
-
p_value
)
# nolint
tdd_full
<-
tdd_mean
%>%
arrange
(
-
p_value
)
# nolint
write_tsv
(
tdd_full
,
paste0
(
output_folder
,
"/full_TDD_correlation_table.txt"
))
write_tsv
(
tdd_full
,
paste0
(
output_folder
,
"/full_TDD_correlation_table.txt"
))
dir
<-
"./data/gene_lists/"
dir
<-
"./data/gene_lists/"
...
@@ -1064,6 +1069,7 @@ create_tdd_violin <- function(tp = 5, groupn = "up_down",
...
@@ -1064,6 +1069,7 @@ create_tdd_violin <- function(tp = 5, groupn = "up_down",
)
)
my_range
<-
c
(
-0.5
,
1
)
my_range
<-
c
(
-0.5
,
1
)
}
else
{
}
else
{
tdd_table
<-
tdd_table
%>%
filter
(
group
!=
"CTRL"
)
title
<-
paste0
(
title
,
" for genes up and down by BRAFi"
)
title
<-
paste0
(
title
,
" for genes up and down by BRAFi"
)
tdd_table
$
group
<-
factor
(
tdd_table
$
group
,
tdd_table
$
group
<-
factor
(
tdd_table
$
group
,
level
=
c
(
"BRAF_UP"
,
"BRAF_DOWN"
)
level
=
c
(
"BRAF_UP"
,
"BRAF_DOWN"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment