Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpibr
schu
UTRPolyribosomes
Commits
220d63ec
Commit
220d63ec
authored
Nov 22, 2017
by
Georgi Tushev
⚽
Browse files
add normed counts
parent
4a7d1a6b
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
countTable_UTRPolysomes_RUVg_22Nov2017.txt
0 → 100644
View file @
220d63ec
This diff is collapsed.
Click to expand it.
edgeR_RUVSeqNorm.R
View file @
220d63ec
...
...
@@ -14,6 +14,7 @@ rm(list = ls());
# read UTR counts
utrs
<-
as.matrix
(
read.table
(
"/Users/tushevg/Desktop/UTRPolyribosomes/countTable_UTRPolysomes_UTRs_21Nov2017.txt"
,
stringsAsFactors
=
F
,
header
=
T
,
row.names
=
1
,
check.names
=
F
,
colClasses
=
c
(
"factor"
,
rep
(
"NULL"
,
5
),
rep
(
"integer"
,
12
))));
filterUTRs
<-
grep
(
"group"
,
rownames
(
utrs
));
# read ERCC counts
ercc
<-
as.matrix
(
read.table
(
"/Users/tushevg/Desktop/UTRPolyribosomes/countTable_UTRPolysomes_ERCC_21Nov2017.txt"
,
stringsAsFactors
=
F
,
header
=
T
,
row.names
=
1
,
check.names
=
F
));
...
...
@@ -33,9 +34,15 @@ data<-rbind(utrs, ercc);
filter
<-
apply
(
data
,
1
,
function
(
x
)
length
(
x
[
x
>=
5
])
>=
2
);
data
<-
data
[
filter
,];
utrs
<-
rownames
(
data
)[
grep
(
"
^ERCC
"
,
rownames
(
data
)
,
invert
=
TRUE
)];
utrs
<-
rownames
(
data
)[
grep
(
"
group
"
,
rownames
(
data
))];
ercc
<-
rownames
(
data
)[
grep
(
"^ERCC"
,
rownames
(
data
))];
# normalize with loess regression
weights
<-
c
(
7
/
100
,
7
/
100
,
10
/
1000
,
10
/
1000
,
16
/
1000
,
16
/
1000
,
22
/
1000
,
22
/
1000
,
24
/
1000
,
24
/
1000
,
7
/
100
,
7
/
100
);
# set factors
levelSample
<-
as.factor
(
rep
(
c
(
"Input"
,
"80S"
,
"2and3"
,
"4and5"
,
"6and7"
,
"bigger7"
),
each
=
2
));
...
...
@@ -59,6 +66,8 @@ pData(set1)
plotRLE
(
set
,
outline
=
FALSE
,
ylim
=
c
(
-4
,
4
),
col
=
colors
[
levelSample
]);
plotPCA
(
set
,
col
=
colors
[
levelSample
]);
write.table
(
normCounts
(
set1
),
"/Users/tushevg/Desktop/UTRPolyribosomes/countTable_UTRPolysomes_RUVg_22Nov2017.txt"
,
quote
=
FALSE
,
sep
=
"\t"
,
col.names
=
TRUE
);
# differential expression analysis EdgeR
design
<-
model.matrix
(
~
levelSample
+
W_1
,
data
=
pData
(
set1
));
y
<-
DGEList
(
counts
=
counts
(
set1
),
group
=
levelSample
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment