-
Notifications
You must be signed in to change notification settings - Fork 0
/
poly_a.R
33 lines (27 loc) · 3.67 KB
/
poly_a.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
lane1.polya <- c(0, 0, 0, 0, 0, 0, 0, 0, 0, 92796, 158899, 132491, 125381, 117301, 114039, 107387, 101842, 98581, 97809, 80509, 83743, 79940, 70571, 68361, 62152, 63974, 57086, 55372, 55113, 52546, 47596, 49098, 44995, 40556, 40702, 38861, 36140, 33841, 33834, 35002, 33430, 29314, 28721, 27251, 26649, 25869, 26895, 28167, 24755, 26977, 27062, 25147, 25185, 26888, 21355, 21990, 21620, 21638, 20873, 20389, 20175, 19038, 20263, 19010, 18383, 19843, 18536, 17061, 16911, 19757, 16074, 16054, 16591, 15559, 15944, 15124, 15050, 14080, 12896, 12009, 11901, 12178, 11099, 10936, 11172, 10190, 10175, 9590, 9154, 8549, 7109, 7351, 8496, 7371, 7215, 7574, 7059, 7918, 6754, 7308, 6820, 6961, 6454, 6455, 6405, 5688, 5771, 10295, 68209, 8107, 7118, 4488, 4607, 4941, 3813, 4125, 3603, 3531, 3368, 3210, 3245, 3471, 3032, 3035, 3075, 2941, 3319, 2986, 2887, 2856, 2871, 3069, 3305, 4102, 5053, 5066, 16034, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
lane2.polya <- c(0, 0, 0, 0, 0, 0, 0, 0, 0, 114204, 184431, 157099, 148433, 139758, 136801, 130415, 122567, 118932, 118173, 99404, 103411, 99091, 87789, 85575, 77465, 81807, 72341, 70297, 69723, 66776, 59962, 61088, 57140, 50811, 51716, 49075, 45655, 43168, 43485, 45438, 42657, 38116, 36762, 34547, 35526, 33161, 34536, 36297, 32381, 34878, 34920, 33166, 32497, 34677, 28053, 29064, 28958, 28822, 27771, 26633, 26728, 25028, 26623, 24832, 24373, 26374, 24101, 22687, 22658, 25998, 20924, 20830, 21974, 20115, 21049, 20267, 19830, 18847, 16642, 15634, 15748, 15939, 14543, 14185, 13941, 13502, 12984, 12267, 11906, 11057, 9397, 9549, 10913, 9211, 9450, 9834, 9151, 9913, 8343, 8857, 8526, 8803, 7985, 8099, 8209, 6812, 7103, 11453, 66989, 9098, 7974, 5285, 5491, 5776, 4618, 5003, 4770, 4389, 4257, 3990, 3849, 4250, 3910, 3773, 3758, 3683, 4058, 3633, 3589, 3606, 3669, 3702, 4079, 4869, 6046, 6145, 19403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
lane3.palya <- c(0, 0, 0, 0, 0, 0, 0, 0, 0, 93548, 157080, 132099, 124772, 117042, 113999, 108233, 101820, 100133, 98124, 82056, 83950, 81293, 72413, 70046, 63979, 65537, 58665, 56277, 56057, 53025, 48546, 50480, 46040, 40844, 41463, 39285, 36441, 34060, 34311, 36033, 32780, 29992, 28651, 26850, 27501, 25239, 26935, 28046, 24732, 26218, 26260, 25021, 25181, 27011, 21567, 22854, 21838, 22246, 20958, 20549, 20409, 19357, 20650, 18875, 18510, 19997, 18341, 17433, 17649, 19922, 16366, 15928, 17180, 15587, 16131, 15269, 15325, 14523, 12791, 12071, 11847, 12278, 11374, 11086, 10887, 10174, 10167, 9561, 9497, 8593, 7284, 7325, 8744, 7243, 7287, 7789, 7295, 7986, 6611, 7364, 6839, 7073, 6583, 6671, 6869, 5980, 6315, 11628, 72213, 8975, 7884, 4605, 4884, 5325, 3871, 4261, 3977, 3713, 3814, 3421, 3375, 3848, 3433, 3175, 3230, 3352, 3524, 3272, 3141, 3024, 3118, 3316, 3539, 4500, 5334, 5331, 17127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
barplot(lane1.polya[10:150], lane2.polya[10:150], names.arg = 10:150)
barplot(lane2.polya[10:150], names.arg = 10:150)
plot(10:137, lane2.polya[10:137], type="l", cex=0.6, col="red", xlab="Poly(A) length", ylab = "Count")
lines(10:137, lane1.polya[10:137], pch=16, col="black", cex=0.6)
lines(10:137, lane3.palya[10:137], pch=16, col="green", cex=0.6)
legend(100,17e4, c("Lane 1 (1,1%)","Lane 2 (1.4%)", "Lane 3 (1,2%)"), lty=c(1,1), col=c("black","red", "green"),bty = "n")
dfr <- data.frame(
V1 = lane1.polya,
V2 = lane2.polya,
row.names = 1:150
)
dfr$category <- row.names(dfr)
mdfr <- melt(dfr, id.vars = "category")
library(ggplot2)
library(reshape2)
library(scales)
(p <- ggplot(mdfr, aes(category, value, fill = variable)) +
geom_bar(stat = "identity")
)
x = c(9:150)
y = c(poly.a.sizes[9:150])
df <- data.frame(x,y)
library(ggplot2)
ggplot(df, aes(x, y, fill = as.factor(x))) + geom_bar(stat = "identity")