Skip to content

Latest commit

 

History

History
189 lines (156 loc) · 6.6 KB

User:Thomas Hollis.wiki

File metadata and controls

189 lines (156 loc) · 6.6 KB

User: Thomas Hollis
(Thomas Hollis' personal user page)

A picture of Thomas Hollis passed through multiple iterations of Google Deep Dream [1] algorithms

 __TOC__

About

Formerly a Bachelor of Electrical and Electronic Engineering at the University of Manchester (2015-2018), I am now a candidate in the Master of Science in Applied Computing at University of Toronto (2018-2020). Biology novice.

Contact me

Email address: mailto:thollis@cs.toronto.edu

Useful code

Below is a collection of useful code snippets for subsequent reuse and referral. I hope that future-me finds them useful, as well as hopefully other classmates.

Git cheat sheet

This is a cheat sheet for Git syntax that I wrote to help myself and classmates remember any git command for the future.

Command example Operation explanation
 git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY 
Clones the linked repository to local storage
git push origin master 
Pushes the updated file to the master branch with the version as a comment

R cheat sheet

This is a cheat sheet for R syntax that I wrote for myself and my classmates to avoid silly mistakes and learn the R language more thoroughly.

Command example Operation explanation
library(RWeka)
Installs the RWeka package and all its dependencies
save(x, y, z, file = “mydata.RData”)
Saves objects x, y, z regardless of whether they are vectors, factors, lists or data frames into a file of given name.
load(“mydata.RData”)
Recreates the x, y, z data structures
save.image()
Saves current session to a file called .RData (R will look for this file automatically next time you start R)
CTRL+L
Clears terminal
mydata <- read.csv("data.csv", stringsAsFactors = FALSE, header = FALSE)
By default R assumes that CSV files include headers as the first row of the file thus header = FALSE must be used for headless CSV files.
write.csv(pt_data, file = "pt_data.csv")
Used to create a CSV file from an R object
object_name
Prints the information stored in an R object
remove(object_name)
Removes an R object
CVector_name <- c(“John”)
Writes a character vector
NVector_name <- c(9.81)
Writes a numeric vector
IVector_name <- c(12, 13)
Writes an integer vector (two entries)
LVector_name <- c(TRUE, FALSE)
Writes a logical vector (two entries)
NULL
Special vector type used in machine learning used to indicate absence of a value
NA
Special vector type used in machine learning used to indicate missing value (used for uninitialized values in vectors)
& | ! 
AND, OR, NOT logical operators
%>%
Pipe operator
Vector_name[1:4]
Prints elements of vector from 1st to 4th in the form: [1] 12, 13, NA, NA
blood <- factor(c("O", "AB", "A"), levels = c("A", "B", "AB", "O"))
Creating a factor with 3 blood types and adding a level that did not appear in the data before writing to the var ‘blood’ in the form: [1] O AB A Levels: A B AB O
list()
List function which creates a list, a fast way of assigning/displaying data of an object
m <- matrix(c('a', 'b', 'c', 'd'), nrow = 2)
Matrix creation results in the following: "a" "c" "b" "d"
summary(patients$year)
Useful for investigating numeric variables (displays several common summary statistics).
mean()
Function used to find the mean of data
median()
Function used to find the median of data
range()
Returns minimum and maximum values of data
IQR()
Used to find the inter-quartile range of data
var()
Outputs the variance of dataset
sd()
Outputs the standard deviation of dataset
plot(x = patiens$age, y = patients$diseases,
main = "Scatterplot of Age vs. Concurrent Diseases",
xlab = "Patient age (years)",
ylab = "Number of concurrent diseases")
Typical scatterplot command

My Subpages

Journal

Insights!

Evaluation: Storing Data (learning unit)

Evaluation: Graphs and Networks (learning unit)

Evaluation: PPI Analysis (learning unit)

Evaluation: Multiple Sequence Alignment (learning unit)

Evaluation: GEO2R (learning unit)

Evaluation: Mutation Impact (integrator unit)

Evaluation: Phylogeny (integrator unit)

Evaluation: Homology Modelling (integrator unit)

Evaluation: Genome Annotation (integrator unit)

External Links

Github account: https://github.com/PsiPhiTheta (lots of additional material here that this course inspired me to do)

Google scholar account: https://scholar.google.co.uk/citations?user=Gmr1zVUAAAAJ&hl=en (my current publications)

UofT landing page: http://www.cs.toronto.edu/~thollis/

Personal landing page: http://www.thomashollis.com

References

  1. ^ Google. (2015, August 12). Google/deepdream. Retrieved September 15, 2018, from https://github.com/google/deepdream