Download presentation
Presentation is loading. Please wait.
1
Computational Biology
Dr. Jens Allmer MBG404 Lecture Slides Week 3
2
Reminder Practice
3
Output Redirection (Win,nix)
Stores the output in a file Creates a new file ‘> file path’ Appens to an existing or new file ‘>> file path’ Example C:\ipconfig /all > res.txt C:\route print >> res.txt Output from ipconfig and route will now be in c:\res.txt Pipes Standard out (stdout) 1> Standard error (stderr) 2> B | A redirects stdout of B to stdin of A
4
Absolute Addressing Specify the complete path starting with the drive letter Example C:\windows\system32\ipconfig.exe ?>ipconfig /all >> “C:\Documents and Settings\jens\res.txt”
5
Relative Addressing Specify directions to reach the file
Current directory is specified before > Example C:\Documents and Settings\jens> (abbrev. to ?> where ‘?’ can be any path) Directions Start from current directory ../ go to parent directory /dir go into a child directory ?>ipconfig /all >> “../New Folder/test.txt”
6
Addressing You can mix Relative addressing Absolute addressing Make sure to quote parameters that contain whitespace E.g.: “C:\Documents and Settings” The redirection of output (pipe) can be anywhere on the commandline E.g.: ipconfig /all >> res.txt E.g.: ipconfig >> res.txt /all
7
Running JAVA Programs JAVA programs are not executed directly
They need the Java Virtual Machine (JVM) Thus Java needs to be started instead of the program Java programs often come as jar files This can be passed to the JVM as a parameter Example Java.exe –jar DNATranslator.jar Download from bioinformatics.allmer.de/tools Programs available in JAVA Many in all areas of biology
8
Running JAVA Programs Java jar files sometimes don’t have a main class
Then they can be run using class paths Java –cp test Java –cp FastaEditor.jar fastaeditor.FastaEditorFrm
9
| Forward the information from one command to the next (piping)
dir | find /I «searchstring» Create two text files with some small differences fc t1.txt t2.txt | find «searchstring»
10
Console Commands <, >, >> Pipe character: | PATH variable
11
Batch Files Use notepad to write a text file
Change the text file to the extension .bat How? On the console using rename Open the file in notepad and just type: dir Save and close the file Execute the file by double clicking Execute the file from the console Write a script that Clears the screen creates a new folder Stores the output of ipconfig in the new folder Searches for «10.» in the output file
12
End of Practice I 15 min break
13
Whiteboardmaths.com Click when ready
© All rights reserved Stand SW 100 Click when ready In addition to the demos/free presentations in this area there are at least 8 complete (and FREE) presentations waiting for download under the My Account button. Simply register to download immediately.
14
Median, Quartiles, Inter-Quartile Range and Box Plots.
Measures of Spread Remember: The range is the measure of spread that goes with the mean. Example 1. Two dice were thrown 10 times and their scores were added together and recorded. Find the mean and range for this data. 7, 5, 2, 7, 6, 12, 10, 4, 8, 9 Mean = 10 = 70 10 = 7 Range = 12 – 2 = 10
15
A reminder about the median
Median, Quartiles, Inter-Quartile Range and Box Plots. Measures of Spread The range is not a good measure of spread because one extreme, (very high or very low value) can have a big affect. The measure of spread that goes with the median is called the inter-quartile range and is generally a better measure of spread because it is not affected by extreme values. A reminder about the median
16
Averages (The Median) Single middle value Ordered data
The median is the middle value of a set of data once the data has been ordered. Example 1. Robert hit 11 balls at Grimsby driving range. The recorded distances of his drives, measured in yards, are given below. Find the median distance for his drives. 85, 125, 130, 65, 100, 70, 75, 50, 140, 95, 70 50, 65, 70, 70, 75, 85, 95, 100, 125, 130, 140 Ordered data Single middle value Median drive = 85 yards
17
Two middle values so take the mean.
Averages (The Median) The median is the middle value of a set of data once the data has been ordered. Example 1. Robert hit 12 balls at Grimsby driving range. The recorded distances of his drives, measured in yards, are given below. Find the median distance for his drives. 85, 125, 130, 65, 100, 70, 75, 50, 140, 135, 95, 70 50, 65, 70, 70, 75, 85, 95, 100, 125, 130, 135, 140 Ordered data Two middle values so take the mean. Median drive = 90 yards
18
Inter-Quartile Range = 9 - 5½ = 3½
Finding the median, quartiles and inter-quartile range. Example 1: Find the median and quartiles for the data below. 12, 6, 4, 9, 8, 4, 9, 8, 5, 9, 8, 10 Order the data Lower Quartile = 5½ Q1 Median = 8 Q2 Upper Quartile = 9 Q3 4, 4, 5, 6, 8, 8, 8, 9, 9, 9, 10, 12 Inter-Quartile Range = 9 - 5½ = 3½
19
Inter-Quartile Range = 10 - 4 = 6
Finding the median, quartiles and inter-quartile range. Example 2: Find the median and quartiles for the data below. 6, 3, 9, 8, 4, 10, 8, 4, 15, 8, 10 Order the data Lower Quartile = 4 Q1 Median = 8 Q2 Upper Quartile = 10 Q3 3, 4, 4, 6, 8, 8, 8, 9, , 10, 15, Inter-Quartile Range = = 6
20
Discuss the calculations below.
2, 5, 6, 6, 7, 8, 8, 8, 9, 9, 10, 15 Median = 8 hours and the inter-quartile range = 9 – 6 = 3 hours. Battery Life: The life of 12 batteries recorded in hours is: Mean = 93/12 = 7.75 hours and the range = 15 – 2 = 13 hours. Discuss the calculations below. The averages are similar but the measures of spread are significantly different since the extreme values of 2 and 15 are not included in the inter-quartile range.
21
Boys Girls Box Plots Box and Whisker Diagrams. 4 5 6 7 8 9 10 11 12
130 140 150 160 170 180 190 Boys Girls cm Box and Whisker Diagrams. Box plots are useful for comparing two or more sets of data like that shown below for heights of boys and girls in a class. Anatomy of a Box and Whisker Diagram. Lowest Value Lower Quartile Upper Quartile Highest Value Median Whisker Box 4 5 6 7 8 9 10 11 12 Box Plots
22
4, 4, 5, 6, 8, 8, 8, 9, 9, 9, 10, 12 Example 1: Draw a Box plot for the data below Drawing a Box Plot. Lower Quartile = 5½ Q1 Upper Quartile = 9 Q3 Median = 8 Q2 4 5 6 7 8 9 10 11 12
23
3, 4, 4, 6, 8, 8, 8, 9, , 10, 15, Example 2: Draw a Box plot for the data below Drawing a Box Plot. Upper Quartile = 10 Q3 Lower Quartile = 4 Q1 Median = 8 Q2 3 4 5 6 7 8 9 10 11 12 13 14 15
24
Question: Stuart recorded the heights in cm of boys in his class as shown below. Draw a box plot for this data. Drawing a Box Plot. 137, 148, 155, 158, 165, 166, 166, 171, 171, 173, 175, 180, 184, 186, 186 Upper Quartile = 180 Qu Lower Quartile = 158 QL Median = 171 Q2 130 140 150 160 170 180 190 cm
25
Drawing a Box Plot. Boys Girls
2. The boys are taller on average. Question: Gemma recorded the heights in cm of girls in the same class and constructed a box plot from the data. The box plots for both boys and girls are shown below. Use the box plots to choose some correct statements comparing heights of boys and girls in the class. Justify your answers. Drawing a Box Plot. 130 140 150 160 170 180 190 Boys Girls cm 1. The girls are taller on average. 3. The girls show less variability in height. 4. The boys show less variability in height. 5. The smallest person is a girl. 6. The tallest person is a boy.
26
End of Theory I Mind map 5 min Break 10 min
27
Practice II
28
Konstanz Information Miner
We will use the Workflow Management and Data Analytics Platform First we need to find out how to get our data into KNIME
29
Create Data Use Excel to create two colums Girls, boys
Make a few hundred random numbers (randbetween) for girls for boys Copy the table Paste into Notepad++ Save as Distribution.txt
30
KNIME Data Import Open Knime
Select the folder containing the data as workspace Right click LOCAL Select new workflow Name it HeightAnalysis Drag and Drop Distribution.txt into the workflow
31
Box Plot Type box to find box plot node Double click
Right click Box Plot node Select Execute and open views Done
32
Workflow
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.