My current work.

This commit is contained in:
Harrison Deng 2021-10-27 02:28:10 -04:00
parent 25249108ca
commit b51476f5a0
6 changed files with 116 additions and 9 deletions

View File

@ -293,6 +293,47 @@ for (ID in pID) {
# BUT COPY THE EXACT, COMPLETE OUTPUT, PASTE IT INTO YOUR SUBMISSION,
# AND FORMAT IT CORRECTLY.
# == Submission - Code to add another philosopher to the datamodel:
pID <- autoincrement(philDB$person)
immanuelKant <- data.frame(id = pID,
name = "Immanuel Kant",
born = "1724",
died = "1804",
school = "Enlightenment Philosophy")
philDB$person <- rbind(philDB$person, immanuelKant)
bID = autoincrement(philDB$books)
immanuelKantWork <- data.frame(id = bID,
title = "Critique of Pure Reason",
published = "1781")
philDB$books <- rbind(philDB$books, immanuelKantWork)
philDB$works <- rbind(philDB$works, data.frame(id = autoincrement(philDB$works), personID = pID, bookID = bID))
bID = autoincrement(philDB$books)
immanuelKantWork <- data.frame(id = bID,
title = "Critique of Judgement",
published = "1790")
philDB$books <- rbind(philDB$books, immanuelKantWork)
philDB$works <- rbind(philDB$works, data.frame(id = autoincrement(philDB$works), personID = pID, bookID = bID))
# == Submission: Code to list the philosophical schools in alphabetical order as well as their respective books in alphabetical order.
schools <- unique(philDB$person$school)
schools <- sort(schools)
for (s in schools) {
cat(sprintf("%s\n", s))
authors = which(philDB$person$school == s)
for (author in authors) {
works = which(philDB$works$personID == author)
for (work in works) {
bookId = which(philDB$books$id == philDB$works$bookID[work])
cat(sprintf("\t%s - (%s)\n", philDB$books$title[bookId], philDB$books$published[bookId]))
}
}
}
# = 2 Implementing the protein datamodel ==================================

View File

@ -14,7 +14,8 @@
# ==============================================================================
# options(stringsAsFactors = FALSE)
myEMail <- "<your-e-mail-address-here>" # e.g. "u.franklin@utoronto.ca"
myStudentNumber <- <your-student-number-here> # e.g. 1003141592
myEMail <- "yh.deng@mail.utoronto.ca" # e.g. "u.franklin@utoronto.ca"
myStudentNumber <- 1005845285 # e.g. 1003141592
MYSPE <- "Cutaneotrichosporon oleaginosum"
# [END]

View File

@ -0,0 +1,4 @@
[{
"ID": 879819,
"species": "Cutaneotrichosporon oleaginosum"}
]

19
myScripts/MBP1_CUTOL.json Normal file
View File

@ -0,0 +1,19 @@
[
{ "name" : "MBP1_CUTOL",
"RefSeqID" : "XP_018278493.1",
"UniProtID" : "A0A0J0XLN0",
"taxonomyID" : 879819,
"sequence" : [
"MGKKAAAAGDGGPNTIYKATYSGVPVFEFICRNVAVMRRRSDAYLNATQILKVAGFDKPQRTRVLEREVQ",
"KGEHEKVQGGYGKYQGTWVPIERGLALAKQYNVEDLLRPIIDFVPRESVSPPPAPKHAVAPPTKRNKEPK",
"PKEGLVPIKSAGVLSGTGRHQTPDSVGEDVESEVMDDMSESQTPSPLNGTSLLPAVDERSIDGMDIDGFS",
"MMNGGGHARKRSAAMMDDEDEYEQLKRARGNSAVHTPPPPGQSPRYGGMQHPLTQDEYNDIVLNYFVSEA",
"TQIPAVMTNPPYNWDPNGIIDDDHHTALHWAAAMGRTRVIKLLLSAGARIFDKNNLDQTPLMRSVMFTNN",
"YDLRKFPEVFELLHRSTLNIDKNNRTVFHHIANLALYKGKTHAARYYMEVILSRLADYPQELADVINFAD",
"EDGETALTLAARARSKRIVKALLDHGADPKLRNRDHKSAEDYILEDERFRSSPDVMLNRTQPSAAPRNPT",
"SLGAAVFSQGLPPQLYNSEAARLASGPHSSDILQQMQALARSFEAEKLNKERDVLEAKAMLTSIHTEVND",
"AGRTLHNLGEQMKPLEAKQGELDGLVERLQSKLQKDLARGARKWKAADEGRENRWKNGDDPSQAGEDYSD",
"LPELTAIPDNAEAEEERLRGEIEKMRARRGELVTRLVKAQTQTGTTDKMAQYRRLITAGCGGDINPGEID",
"DIVGQLLDMLENEAQSGRPAPPPQAAPSWVTS"]
}
]

View File

@ -0,0 +1,4 @@
source("./scripts/ABC-createRefDB.R")
myDB <- dbAddProtein(myDB, jsonlite::fromJSON("./myScripts/MBP1_CUTOL.json"))
myDB <- dbAddTaxonomy(myDB, jsonlite::fromJSON("./myScripts/CUTOLtaxonomy.json"))

38
myScripts/myScript.R Normal file
View File

@ -0,0 +1,38 @@
# myScript.R
#
# --- As you work with this file, you can delete the instructions below --------
# Write your notes and code experiments into this document. Save it
# from time to time - however I recommend that you do not _commit_
# your saved version.
#
# As long as you do not _commit_ this script to version control,
# you can _pull_ updated versions of the entire project from GitHub
# by using the RStudio version control interface. However, once
# you _commit_ any file in your local version, RStudio will require
# you to resolve conflicts before you can _pull_ updates.
# --- As you work with this file, you can delete the instructions above --------
#
## Purpose: <...>
#
# Version: <...>
#
# Date: <...>
# Author: <Name> (<namee@mail.utoronto.ca>)
#
# Versions:
#
# <number> <Features>
#
# TODO:
# <...>
#
# ====================================================================
# [END]