Events

Invalid Start Date
start 596970720
Refresh calendars Add to google calendar
November,2024
25 Nov 1:00 pm 4:00 pm

Intro to Linux Command Line

Working with many of the HPC systems (like those at SciNet) involves using the Linux/UNIX command line. This provides a very powerful interface, but it can be quite daunting for the uninitiated. In this half-day session, you can become initiated with this course which will cover basic commands. It could be a great boon for your productivity.Format: Virtual Virtual
SCMP101 - Nov 2024Show in Google map
26 Nov 1:00 pm 2:00 pm

Intro to Programming with Python

New to programming? Learn the basics of programming using python in eight one-hour sessions over the course of four weeks. Sessions will consist of a mix of lectures and hands-on exercises.Format: In-person. Sessions will be recorded. SciNet Teaching Room
SCMP142 - Nov 2024Show in Google map
28 Nov 1:00 pm 2:00 pm

Intro to Programming with Python

New to programming? Learn the basics of programming using python in eight one-hour sessions over the course of four weeks. Sessions will consist of a mix of lectures and hands-on exercises.Format: In-person. Sessions will be recorded. SciNet Teaching Room
SCMP142 - Nov 2024Show in Google map
28 Nov 11:59 pm

Assignmen 10 - new is due

Due date: November 28th at midnight (Thursday night).



In this assignment we will perform a clustering analysis on some codon data. Codons, for those unfamiliar, are sequences of three nucleotides that form a unit of genetic information. Since there are 4 nucleotide bases (A, C, T, G), there are 4*4*4=64 possible codons. You can read more about codons here.

The data for this assignment were originally taken from here, though the original source is here. I have modified the data to simplify it somewhat; the modified data can be found here. The data consists of codon relative-frequency data for 3000 species of organisms. We will perform a clustering analysis on these data to determine if there are any clusters of significance and which 'Kingdoms' (types of organisms), are most-commonly in those clusters.



0) You must use version control ("git"), as you develop your code. We suggest you start, from the Linux command line, by creating a new directory, e.g. assignment10, cd into that directory and initialize a git repository ("git init") within it, and perform "git add ..., git commit" repeatedly as you add to your code. You will hand in the output of "git log" for your assignment repository as part of the assignment. You must have a significant number of commits representing the modifications, alterations and changes to your code. If your log does not show a significant number of commits with meaningful comments you will lose marks.



1) Create a file named Codon.Utilities.R containing the following functions.

1a) Write a function which takes a single string argument, the name of the data file. The function should load the data, keep only the features (the codon columns) and the target (the 'Kingdom' column), and return the resulting data frame. You may hard-code the column names involved.

1b) Write a function which, given some input data and a percentage, will perform a principle component analysis. The function should keep only those priciple components whose standard deviations are greater than or equal to the standard deviation of the first principle component, multiplied by the second argument (see the tol argument to the prcomp function). The function should then return the model.

1c) Write a function which, given some input data, will perform 10-fold cross validation on \\(k\\)-Means models, with \\(k\\) values ranging from 1 to 15. The function should generate a plot of cross-validation score versus \\(k\\). You may copy the cross-validation function given in lecture.

1d) Write a function which takes as arguments a trained \\(k\\)-means model and a vector of targets. The function should determine the Kingdom with the highest population in each cluster. The function should print out the cluster number, the name of the Kingdom and the percentage of the population of the cluster that it represents.



2) Create a script called Codon.Analysis.R that will perform the following steps:

take a single command-line argument, the data to be processed,
load the modified data file, linked above,
run PCA on the features, keeping those principle components whose standard deviations are at least 20% of the first principle component's standar deviation.
create a transformed version of the original features, using the principle components from the PCA. The predict function works to do this, in the usual way.
run 10-fold cross-validation on \\(k\\)-means models, using the transformed data, to determine which value of \\(k\\) would be the ideal number of clusters for this data set.
At this point you should examine the figure which is generated by the function. Using your expertise, pick an ideal value of \\(k\\) for this data set. Put an explanation of your choice in the comments of your driver script.
Create a new \\(k\\)-Means model, using your choice of ideal value of \\(k\\) and the transformed data.
Print out the Kingdom in each cluster of your new model which has the largest population, and its percentage of the cluster's total population.


Your script should output something like this, when run from the shell terminal:


$
$ Rscript Codon.Analysis.R codon_usage_filtered_small.csv
Cluster: 1 , Kingdom: Bacteria , Percent: 25.95819 %
Cluster: 2 , Kingdom: Vertebrate , Percent: 68.80734 %
Cluster: 3 , Kingdom: Bacteria , Percent: 85.90164 %
Cluster: 4 , Kingdom: Virus , Percent: 52.35149 %
Cluster: 5 , Kingdom: Plant , Percent: 53.6036 %
Cluster: 6 , Kingdom: Bacteria , Percent: 47.8022 %
$

Be sure to comment and document your functions. Defensive programming is needed for the number of driver-script arguments and the precense of the data file.




Submit your Codon.Utilities.R, Codon.Analysis.R files, your cross-validation figure, and the output of git log from your assignment repository.


Both R code files must be added and committed frequently to the repository. To capture the output of git log use redirection (git log > git.log, and hand in the git.log file). 



Assignments will be graded on a 10 point basis. Due date is November 28th 2024 (midnight), with 0.5 penalty point per day off for late submission until the cut-off date of December 5th 2024, at 10:00am.

MSC1090 - Fall 2024
29 Nov 1:00 pm 4:00 pm

Intro to Apptainer

Container computing is gradually changing the way researchers are developing, sharing, and running software applications. Apptainer (formerly called Singularity) is gaining popularity in HPC for its performance, ease of use, portability,  and security. In this course, we will explore: what is a container, why use a container, and how to use and create one.Format: Virtual
SCMP161 - Nov 2024