Hi,
ich generiere mir folgende Daten:
Das Ergebnis sieht so aus:
Wie erstelle ich daraus jetzt einen Barplot?
ich generiere mir folgende Daten:
Code:
dat.matrix = matrix(
c(
"# reads",
length(dat.reads),
"# unspliced",
sum(dat.reads[,1] == 1),
"# unspliced without mismatches",
sum(unlist(apply(dat.reads, 1, function(x) x[1]==1 && x[2] == 0))),
"# split reads",
sum(dat.reads[,1] > 1),
"# split reads without mismatches",
sum(unlist(apply(dat.reads, 1, function(x) x[1] > 1 && x[2] == 0))),
"# split reads without mismatches and only regions longer than 5bp",
sum(unlist(apply(dat.reads, 1, function(x) x[1] > 1 && x[2] == 0 && x[3])))),
ncol=2,
byrow=TRUE
)
Das Ergebnis sieht so aus:
Code:
> dat.matrix
[,1]
[1,] "# reads"
[2,] "# unspliced"
[3,] "# unspliced without mismatches"
[4,] "# split reads"
[5,] "# split reads without mismatches"
[6,] "# split reads without mismatches and only regions longer than 5bp"
[,2]
[1,] "45938592"
[2,] "10610924"
[3,] "4993760"
[4,] "4701940"
[5,] "2212949"
[6,] "1986802"
Wie erstelle ich daraus jetzt einen Barplot?