Final code edits and report
This commit is contained in:
parent
bda39896f2
commit
8e2c04a699
@ -1 +0,0 @@
|
||||
,noah,NovaArchSys,06.09.2022 17:52,file:///home/noah/.config/libreoffice/4;
|
||||
Binary file not shown.
BIN
Schrick-Noah_CS-6643_Lab1-Report.pdf
Normal file
BIN
Schrick-Noah_CS-6643_Lab1-Report.pdf
Normal file
Binary file not shown.
@ -32,7 +32,7 @@ pie(my.dna.table.df$Freq, labels = my.dna.table.df$label, col = cols,
|
||||
main = "Pie Chart Representation of Random ACTG Sample")
|
||||
|
||||
|
||||
bp <- barplot(as.matrix(my.dna.table), beside = TRUE, xlab = "Letter",
|
||||
bp <- barplot(as.matrix(my.dna.table), beside = TRUE, xlab = "Nucleotide",
|
||||
ylab = "Frequency", ylim = c(-1, max(as.numeric(my.dna.table))+2),
|
||||
main = "Bar Plot Representation of Random ACTG Sample", col = cols,
|
||||
legend = TRUE)
|
||||
@ -69,7 +69,6 @@ fasta2vec <- function(fasta.file){
|
||||
fasta.string <- fasta[[1]][1]
|
||||
fasta.list <- strsplit(fasta.string,"")
|
||||
fasta.vec <- unlist(fasta.list)
|
||||
|
||||
}
|
||||
|
||||
fasta.vec <- fasta2vec("apoe.fasta")
|
||||
@ -93,7 +92,8 @@ fasta.bp <- barplot(as.matrix(fasta.table), beside = TRUE, xlab = "Letter",
|
||||
col = fasta.cols, legend = TRUE)
|
||||
|
||||
text(x = fasta.bp, y = 1.1*fasta.table, labels = as.numeric(fasta.table))
|
||||
text(x = fasta.bp, y = -0.10*max(as.numeric(fasta.table)), labels = names(fasta.table))
|
||||
text(x = fasta.bp, y = -0.10*max(as.numeric(fasta.table)),
|
||||
labels = names(fasta.table))
|
||||
|
||||
## g
|
||||
fasta.nuc_prob <- fasta.table/fasta.len
|
||||
@ -138,10 +138,13 @@ compare.bp <- barplot(as.matrix(compare.bind), beside = TRUE,
|
||||
ylim = c(-0.0,
|
||||
1.25*max(c(fasta.nuc_prob, covid.nuc_prob))),
|
||||
main = "Bar Plot Representation and Comparison of APOE to COVID Nucleotide Probabilities",
|
||||
legend = TRUE)
|
||||
legend = TRUE, legend.text = c("APOE", "COVID"))
|
||||
|
||||
ycords = 1.03*c(rbind(as.vector(fasta.nuc_prob), as.vector(covid.nuc_prob)))
|
||||
tlabs = c(rbind(as.vector(fasta.nuc_prob), as.vector(covid.nuc_prob)))
|
||||
text(x = compare.bp, y = ycords,
|
||||
labels = round(as.numeric(tlabs), digits = 3))
|
||||
|
||||
## b
|
||||
covid.gc <- GC(covid.vec)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user