Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
custom
Bonini_TIGIT2024
Bonini_TIGIT2024_NHEJ
Commits
9edfd024
Commit
9edfd024
authored
Aug 27, 2024
by
Stefano Beretta
Browse files
Upload New File
parent
0621e251
Changes
1
Show whitespace changes
Inline
Side-by-side
Plot_NHEJ_results.R
0 → 100644
View file @
9edfd024
library
(
openxlsx
)
library
(
dplyr
)
library
(
ggplot2
)
library
(
openxlsx
)
full.t
<-
read.xlsx
(
"NHEJ_Alleles_corr_thr0.2.xlsx"
)
head
(
full.t
)
tt
<-
full.t
%>%
filter
(
is.na
(
Ref
))
%>%
group_by
(
Sample
,
Group
,
Treatment
)
%>%
summarise
(
PercModif
=
sum
(
perc_reads
))
ttref
<-
full.t
%>%
filter
(
Ref
==
"*"
&
Group
!=
"OT3_R1"
)
%>%
group_by
(
Sample
,
Group
,
Treatment
)
%>%
summarise
(
PercRef
=
sum
(
perc_reads
))
tt
<-
merge
(
tt
,
ttref
,
by
=
c
(
"Sample"
,
"Group"
,
"Treatment"
),
all
=
T
)
tt
$
Tot
<-
tt
$
PercModif
+
tt
$
PercRef
tt
$
PercModif
[
is.na
(
tt
$
PercModif
)]
<-
0
tt
$
Group
<-
factor
(
tt
$
Group
,
levels
=
c
(
"A"
,
"B1"
,
"B2"
,
"Tigit"
,
"OT1"
,
"OT2"
,
"OT3"
,
"OT4"
,
"OT5"
,
"OT6"
,
"OT7"
,
"OT8"
))
head
(
tt
)
p
<-
ggplot
(
tt
,
aes
(
x
=
Treatment
,
y
=
PercModif
,
color
=
Treatment
))
+
theme_bw
(
base_size
=
13
)
+
theme
(
axis.text.x
=
element_text
(
angle
=
45
,
hjust
=
1
),
legend.position
=
"none"
)
+
geom_jitter
(
size
=
2
,
alpha
=
.6
,
width
=
.4
)
+
scale_color_brewer
(
palette
=
"Set1"
)
+
ylab
(
"Sum % Modif."
)
+
scale_y_continuous
(
n.breaks
=
10
)
+
facet_grid
(
.
~
Group
)
p
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