SlideShare a Scribd company logo
1 of 54
Download to read offline
Research Methods & Comms.
y.wurm@qmul.ac.uk
https://wurmlab.github.io
Dr. Beth Clare
Welcome	
  to	
  SBC	
  361
Course	
  Content
Full	
  course	
  description	
  is	
  available	
  on	
  QM	
  plus	
  
Overview:	
  
-­‐This	
  course	
  is	
  a	
  mixture	
  of	
  advanced	
  analytical	
  skills	
  and	
  theoretical	
  content	
  
Analytical	
  components	
  in	
  the	
  computer	
  lab:	
  
-­‐Programming	
  in	
  R	
  
-­‐Advanced	
  statistical	
  analysis	
  
Workshops:	
  
-­‐One	
  scheduled	
  on	
  Careers	
  in	
  Science	
  
-­‐One	
  scheduled	
  on	
  Popular	
  Science	
  Writing	
  
Upcoming	
  Assignments:	
  
-­‐Mock	
  Exam	
  
Course	
  Content
Week	
  1	
  :(Dr.	
  Wurm):	
  	
  Programming	
  in	
  R,	
  mock	
  exam	
  
Week	
  2	
  (Dr.	
  Wurm):	
  Programming	
  in	
  R,	
  Data	
  &	
  reproducibility	
  
Week	
  3	
  (Dr.	
  Michaels):	
  Workshop	
  1:	
  Careers	
  in	
  science	
  
Week	
  3,	
  5,	
  10:	
  Tutorial	
  
Week	
  4	
  (Dr.	
  Clare):	
  Reasoning	
  and	
  Philosophy	
  
Week	
  6	
  (Dr.	
  Michaels):	
  Fraud	
  and	
  Controversy,	
  Publishing	
  Industry	
  
Week	
  8:	
  Workshop	
  2:	
  Popular	
  Science	
  Writing	
  
Week	
  8,	
  9,	
  11	
  (Prof.	
  Nichols):	
  P-­‐values,	
  hypotheses,	
  probability	
  
Week	
  12:	
  TBD…we	
  may	
  use	
  these	
  or	
  actually	
  shift	
  them	
  to	
  be	
  exam	
  review	
  classes	
  in	
  semester	
  B	
  
where	
  we	
  would	
  review	
  the	
  course	
  but	
  give	
  additional	
  help	
  on	
  essay	
  writing	
  for	
  exams	
  (requested	
  	
  
by	
  previous	
  years	
  students).	
  
	
  
Computer	
  labs
• Weeks	
  2,4,6,11	
  
– You	
  will	
  be	
  using	
  R	
  (rrrrrr….)	
  
– Weeks	
  2,4,6	
  (Dr.	
  Wurrrrrm)	
  	
  
– Week	
  11	
  (Prof.	
  Nichols)
Tutorials	
  &	
  Assignments
• Tutorials	
  :	
  Weeks	
  3,6,10	
  
– Practice	
  writing	
  essays	
  –	
  this	
  is	
  your	
  chance!	
  
– mock	
  exam	
  
– feedback	
  
– second	
  attempt	
  
– popular	
  science	
  writing	
  
• Assignments:	
  5	
  
– two	
  in	
  computer	
  practical	
  (10%,	
  5%)	
  
– two	
  in	
  tutorial	
  (5%,	
  5%)	
  
– speaker	
  questions	
  –	
  up	
  to	
  1%	
  bonus	
  on	
  the	
  practical	
  quiz
Mock	
  Exam
• Huh?	
  an	
  exam	
  already?	
  
• No	
  preparation	
  required	
  –	
  this	
  draft	
  is	
  to	
  give	
  to	
  your	
  tutor	
  to	
  
get	
  feedback	
  only,	
  you	
  will	
  then	
  revise	
  this	
  and	
  draft	
  two	
  gets	
  
marked	
  
• Know	
  who	
  your	
  tutor	
  is	
  
• Today,	
  Fogg	
  LT	
  12	
  noon	
  for	
  45	
  minutes	
  
• There	
  is	
  no	
  make	
  up.	
  If	
  you	
  don’t	
  come	
  you	
  can	
  join	
  in	
  the	
  
tutorial	
  for	
  general	
  feedback	
  and	
  do	
  draft	
  two	
  but	
  your	
  mark	
  
will	
  be	
  pegged	
  to	
  40%	
  unless	
  you	
  have	
  an	
  EC	
  (e.g.	
  timetable	
  
conflict)
How	
  to	
  succeed	
  in	
  361
• Come	
  to	
  class!	
  
• If	
  we	
  tell	
  you	
  something	
  is	
  required	
  -­‐	
  it	
  is	
  
• Do	
  outside	
  reading
© Alex Wild & others
© National Geographic
Atta leaf-cutter ants
© National Geographic
Atta leaf-cutter ants
© National Geographic
Atta leaf-cutter ants
Oecophylla Weaver ants
© ameisenforum.de
© ameisenforum.de
Fourmis tisserandes
© ameisenforum.de
Oecophylla Weaver ants
© forestryimages.org© wynnie@flickr
Tofilski et al 2008
Forelius pusillus
Tofilski et al 2008
Forelius pusillus hides the nest entrance at night
Tofilski et al 2008
Forelius pusillus hides the nest entrance at night
Tofilski et al 2008
Forelius pusillus hides the nest entrance at night
Tofilski et al 2008
Forelius pusillus hides the nest entrance at night
Avant
Workers staying outside die
« preventive self-sacrifice »
Tofilski et al 2008
Forelius pusillus hides the nest entrance at night
Dorylus driver ants: ants with no home
© BBC
Animal biomass (Brazilian rainforest)
from Fittkau & Klinge 1973
Other insects Amphibians
Reptiles
Birds
Mammals
Earthworms
Spiders
Soil fauna excluding
earthworms,
ants & termites
Ants & termites
We use modern technologies to
understand insect societies.
• evolution of social behaviour
• molecules involved in social behaviour
• consequences of environmental change
Big data is invading biology
This changes
everything.454
Illumina
Solid...
Any lab can
sequence
anything!
http://gregoryzynda.com/ncbi/genome/python/2014/03/31/ncbi-genome.html
BIG
Big data is invading biology
• Genomics
• Cancer genomics
• Biodiversity assessments
• Stool microbiome sequencing
• Personalized medicine
• Sensor networks - e.g tracking microclimates, recording sounds
• Huge medical studies
• Aerial surveys (Drones) - e.g. crop productivity; rainforest cover
• Camera traps
Learning to deal with big data takes time
• Your work last year + at home this year + our 8 hours of practicals.
• QM’s MSc Programs
• Bioinformatics (for biologists)
• Ecological & Evolutionary Genomics (or Biodiversity Informatics)
• EECS: also have some.
Practicals
• Aim: get relevant data handling skills
• Doing things by hand:
• impossible?
• slow,
• error-prone,
• Automate!
• Basic programming
• in R
• no stats!
Why R?
😳😟
😴😡
😥
Practicals: contents
• Groups - ok?
• First 3h practical
• data accessing/subsetting
• search/replace
• regular expressions
• Second 3h practical
• functions
• loops
• Third session:
• 1.5h practical (integrating & revising all skills)
• 1.5h exam
Text search on steroids
Reusable pieces of work
Repeating the same thing many times
http://tryr.codeschool.com
just do it.
• create a variable that contains the number 35
• create a variable that contains the string “I love tofu”
• give me a vector containing the sequence of numbers
from 5 to 11
• access the second number
• replace the second number with 42
• add 5 to the second number
• now add 5 to all numbers
• now add an extra number: 1999
• can you sum all the numbers?
• creating a vector
> my_vector <- c(5, 6, 7, 8, 9, 10, 11)
> my_vector <- 5:11
> my_vector <- seq(from=5, to=11, by=1)
> my_vector
[1] 5 6 7 8 9 10 11
> (10 > 30)

[1] FALSE
> my_vector > 8

[1] FALSE FALSE FALSE FALSE TRUE TRUE TRUE
> my_vector[my_vector > 8]

9 10 11
> other_vector <- my_vector[my_vector > 8]
> other_vector
9 10 11
> other_vector + 3
• give me a vector containing numbers from 5 to 11 (3 variant
• accessing a subset
• of a vector
> big_vector <- 150:100
> big_vector
[1] 150 149 148 147 146 145 144 143 142 141 140 139 138 137 136 1
[20] 131 130 129 128 127 126 125 124 123 122 121 120 119 118 117 1
[39] 112 111 110 109 108 107 106 105 104 103 102 101 100
> big_vector[5]
5
> mysubset <- big_vector[my_vector]
> mysubset
[1] 146 145 144 143 142 141 140
> big_vector > 130
[1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
[13] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE F
[25] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE F
[37] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE F
[49] FALSE FALSE FALSE
> subset(big_vector, big_vector > 140)
[1] 150 149 148 147 146 145 144 143 142 141
> big_vector[big_vector >= 140]
[1] 150 149 148 147 146 145 144 143 142 141 140
> my_vector
[1] 5 6 7 8 9 10 11
Regular expressions (regex):
Text search on steroids.
who dat?
Regular expressions (regex):
Text search on steroids.
Regular expression Finds
David David
Dav(e|(id)) David, Dave
Dav(e|(id)|(ide)|o) David, Dave, Davide, Davo
At{1,2}enborough
Attenborough,
Atenborough
Atte[nm]borough
Attenborough,
Attemborough
At{1,2}[ei][nm]bo{0,1}ro((ugh)|w){0,1}
Atimbro,

attenbrough,
ateinborow
Easy counting, replacing all with “Sir David Attenborough”
Regex special symbols
Regular expression Finds Example
[aeiou] any single vowel “e”
[aeiou]*
between 0 and infinity
vowels vowels, e.g.’
“eeooouuu"
[aeoiu]{1,3} between 1 and 3 vowels “oui”
a|i one of the 2 characters “"
((win)|(fail))
one of the two 

words in ()
fail
More Regex Special symbols
• Google “Regular expression cheat sheet”
• ?regexp
Synonymous with
[:digit:] [0-9]
[A-z] [A-z], ie [A-Za-z]
s whitespace
. any single character
.+ one to many of anything
b* between 0 and infinity letter ‘b’
[^abc] any character other than a, b or c.
( (
[:punct:]
any of these: ! " # $ % & ' ( ) * + , - . /
: ; < = > ? @ [  ] ^ _ ` { |

More Related Content

Similar to 2015 9-30-sbc361-research methcomm

Masters bioinfo 2013-11-14-15
Masters bioinfo 2013-11-14-15Masters bioinfo 2013-11-14-15
Masters bioinfo 2013-11-14-15
Yannick Wurm
 
00_pytorch_and_deep_learning_fundamentals.pdf
00_pytorch_and_deep_learning_fundamentals.pdf00_pytorch_and_deep_learning_fundamentals.pdf
00_pytorch_and_deep_learning_fundamentals.pdf
eanyang7
 

Similar to 2015 9-30-sbc361-research methcomm (20)

2013 10-30-sbc361-reproducible designsandsustainablesoftware
2013 10-30-sbc361-reproducible designsandsustainablesoftware2013 10-30-sbc361-reproducible designsandsustainablesoftware
2013 10-30-sbc361-reproducible designsandsustainablesoftware
 
2014-9-24-SBC361-ResearchMethComm
2014-9-24-SBC361-ResearchMethComm2014-9-24-SBC361-ResearchMethComm
2014-9-24-SBC361-ResearchMethComm
 
2015 11-17-programming inr.key
2015 11-17-programming inr.key2015 11-17-programming inr.key
2015 11-17-programming inr.key
 
Maths for Biology
Maths for BiologyMaths for Biology
Maths for Biology
 
Unit1 ed572seminar
Unit1 ed572seminarUnit1 ed572seminar
Unit1 ed572seminar
 
Middle Out Design
Middle Out DesignMiddle Out Design
Middle Out Design
 
A Modern Introduction to Decision Tree Ensembles
A Modern Introduction to Decision Tree EnsemblesA Modern Introduction to Decision Tree Ensembles
A Modern Introduction to Decision Tree Ensembles
 
2014 11-12 sbsm032rstatsprogramming.key
2014 11-12 sbsm032rstatsprogramming.key2014 11-12 sbsm032rstatsprogramming.key
2014 11-12 sbsm032rstatsprogramming.key
 
Good practices (and challenges) for reproducibility
Good practices (and challenges) for reproducibilityGood practices (and challenges) for reproducibility
Good practices (and challenges) for reproducibility
 
Masters bioinfo 2013-11-14-15
Masters bioinfo 2013-11-14-15Masters bioinfo 2013-11-14-15
Masters bioinfo 2013-11-14-15
 
Lec 01 introduction
Lec 01   introductionLec 01   introduction
Lec 01 introduction
 
Ds & ada
Ds & adaDs & ada
Ds & ada
 
00_pytorch_and_deep_learning_fundamentals.pdf
00_pytorch_and_deep_learning_fundamentals.pdf00_pytorch_and_deep_learning_fundamentals.pdf
00_pytorch_and_deep_learning_fundamentals.pdf
 
2013 10-16-sbc3610-research methcomm
2013 10-16-sbc3610-research methcomm2013 10-16-sbc3610-research methcomm
2013 10-16-sbc3610-research methcomm
 
Database Research Principles Revealed
Database Research Principles RevealedDatabase Research Principles Revealed
Database Research Principles Revealed
 
Introduction to Search Systems - ScaleConf Colombia 2017
Introduction to Search Systems - ScaleConf Colombia 2017Introduction to Search Systems - ScaleConf Colombia 2017
Introduction to Search Systems - ScaleConf Colombia 2017
 
On Impact in Software Engineering Research (HU Berlin 2021)
On Impact in Software Engineering Research (HU Berlin 2021)On Impact in Software Engineering Research (HU Berlin 2021)
On Impact in Software Engineering Research (HU Berlin 2021)
 
Unsupervised Deep Learning in NLP
Unsupervised Deep Learning in NLP Unsupervised Deep Learning in NLP
Unsupervised Deep Learning in NLP
 
Exposé Ontology
Exposé OntologyExposé Ontology
Exposé Ontology
 
Scientific Software Development
Scientific Software DevelopmentScientific Software Development
Scientific Software Development
 

More from Yannick Wurm

More from Yannick Wurm (20)

2018 09-03-ses open-fair_practices_in_evolutionary_genomics
2018 09-03-ses open-fair_practices_in_evolutionary_genomics2018 09-03-ses open-fair_practices_in_evolutionary_genomics
2018 09-03-ses open-fair_practices_in_evolutionary_genomics
 
2018 08-reduce risks of genomics research
2018 08-reduce risks of genomics research2018 08-reduce risks of genomics research
2018 08-reduce risks of genomics research
 
2017 11-15-reproducible research
2017 11-15-reproducible research2017 11-15-reproducible research
2017 11-15-reproducible research
 
2016 09-16-fairdom
2016 09-16-fairdom2016 09-16-fairdom
2016 09-16-fairdom
 
2016 05-30-monday-assembly
2016 05-30-monday-assembly2016 05-30-monday-assembly
2016 05-30-monday-assembly
 
2016 05-29-intro-sib-springschool-leuker bad
2016 05-29-intro-sib-springschool-leuker bad2016 05-29-intro-sib-springschool-leuker bad
2016 05-29-intro-sib-springschool-leuker bad
 
2015 11-10-bio-in-docker-oswitch
2015 11-10-bio-in-docker-oswitch2015 11-10-bio-in-docker-oswitch
2015 11-10-bio-in-docker-oswitch
 
Week 5 genetic basis of evolution
Week 5   genetic basis of evolutionWeek 5   genetic basis of evolution
Week 5 genetic basis of evolution
 
Biol113 week4 evolution
Biol113 week4 evolutionBiol113 week4 evolution
Biol113 week4 evolution
 
2015 10-7-11am-reproducible research
2015 10-7-11am-reproducible research2015 10-7-11am-reproducible research
2015 10-7-11am-reproducible research
 
2015 10-7-9am regex-functions-loops.key
2015 10-7-9am regex-functions-loops.key2015 10-7-9am regex-functions-loops.key
2015 10-7-9am regex-functions-loops.key
 
Evolution week2
Evolution week2Evolution week2
Evolution week2
 
2015 09-29-sbc322-methods.key
2015 09-29-sbc322-methods.key2015 09-29-sbc322-methods.key
2015 09-29-sbc322-methods.key
 
Sbc322 intro.key
Sbc322 intro.keySbc322 intro.key
Sbc322 intro.key
 
2015 09-28 bio721 intro
2015 09-28 bio721 intro2015 09-28 bio721 intro
2015 09-28 bio721 intro
 
Sustainable software institute Collaboration workshop
Sustainable software institute Collaboration workshopSustainable software institute Collaboration workshop
Sustainable software institute Collaboration workshop
 
2014 10-15-Nextbug edinburgh
2014 10-15-Nextbug edinburgh2014 10-15-Nextbug edinburgh
2014 10-15-Nextbug edinburgh
 
2014 12-09-oulu
2014 12-09-oulu2014 12-09-oulu
2014 12-09-oulu
 
2014 11-28-lyon
2014 11-28-lyon2014 11-28-lyon
2014 11-28-lyon
 
2014 11-24-sbsm028-yannicksocialevolution
2014 11-24-sbsm028-yannicksocialevolution2014 11-24-sbsm028-yannicksocialevolution
2014 11-24-sbsm028-yannicksocialevolution
 

Recently uploaded

Recently uploaded (20)

How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 

2015 9-30-sbc361-research methcomm

  • 1. Research Methods & Comms. y.wurm@qmul.ac.uk https://wurmlab.github.io
  • 4. Course  Content Full  course  description  is  available  on  QM  plus   Overview:   -­‐This  course  is  a  mixture  of  advanced  analytical  skills  and  theoretical  content   Analytical  components  in  the  computer  lab:   -­‐Programming  in  R   -­‐Advanced  statistical  analysis   Workshops:   -­‐One  scheduled  on  Careers  in  Science   -­‐One  scheduled  on  Popular  Science  Writing   Upcoming  Assignments:   -­‐Mock  Exam  
  • 5. Course  Content Week  1  :(Dr.  Wurm):    Programming  in  R,  mock  exam   Week  2  (Dr.  Wurm):  Programming  in  R,  Data  &  reproducibility   Week  3  (Dr.  Michaels):  Workshop  1:  Careers  in  science   Week  3,  5,  10:  Tutorial   Week  4  (Dr.  Clare):  Reasoning  and  Philosophy   Week  6  (Dr.  Michaels):  Fraud  and  Controversy,  Publishing  Industry   Week  8:  Workshop  2:  Popular  Science  Writing   Week  8,  9,  11  (Prof.  Nichols):  P-­‐values,  hypotheses,  probability   Week  12:  TBD…we  may  use  these  or  actually  shift  them  to  be  exam  review  classes  in  semester  B   where  we  would  review  the  course  but  give  additional  help  on  essay  writing  for  exams  (requested     by  previous  years  students).    
  • 6. Computer  labs • Weeks  2,4,6,11   – You  will  be  using  R  (rrrrrr….)   – Weeks  2,4,6  (Dr.  Wurrrrrm)     – Week  11  (Prof.  Nichols)
  • 7. Tutorials  &  Assignments • Tutorials  :  Weeks  3,6,10   – Practice  writing  essays  –  this  is  your  chance!   – mock  exam   – feedback   – second  attempt   – popular  science  writing   • Assignments:  5   – two  in  computer  practical  (10%,  5%)   – two  in  tutorial  (5%,  5%)   – speaker  questions  –  up  to  1%  bonus  on  the  practical  quiz
  • 8. Mock  Exam • Huh?  an  exam  already?   • No  preparation  required  –  this  draft  is  to  give  to  your  tutor  to   get  feedback  only,  you  will  then  revise  this  and  draft  two  gets   marked   • Know  who  your  tutor  is   • Today,  Fogg  LT  12  noon  for  45  minutes   • There  is  no  make  up.  If  you  don’t  come  you  can  join  in  the   tutorial  for  general  feedback  and  do  draft  two  but  your  mark   will  be  pegged  to  40%  unless  you  have  an  EC  (e.g.  timetable   conflict)
  • 9. How  to  succeed  in  361 • Come  to  class!   • If  we  tell  you  something  is  required  -­‐  it  is   • Do  outside  reading
  • 10.
  • 11. © Alex Wild & others
  • 12.
  • 13. © National Geographic Atta leaf-cutter ants
  • 14. © National Geographic Atta leaf-cutter ants
  • 15. © National Geographic Atta leaf-cutter ants
  • 16.
  • 17. Oecophylla Weaver ants © ameisenforum.de
  • 21. Tofilski et al 2008 Forelius pusillus
  • 22. Tofilski et al 2008 Forelius pusillus hides the nest entrance at night
  • 23. Tofilski et al 2008 Forelius pusillus hides the nest entrance at night
  • 24. Tofilski et al 2008 Forelius pusillus hides the nest entrance at night
  • 25. Tofilski et al 2008 Forelius pusillus hides the nest entrance at night
  • 26. Avant Workers staying outside die « preventive self-sacrifice » Tofilski et al 2008 Forelius pusillus hides the nest entrance at night
  • 27. Dorylus driver ants: ants with no home © BBC
  • 28. Animal biomass (Brazilian rainforest) from Fittkau & Klinge 1973 Other insects Amphibians Reptiles Birds Mammals Earthworms Spiders Soil fauna excluding earthworms, ants & termites Ants & termites
  • 29. We use modern technologies to understand insect societies. • evolution of social behaviour • molecules involved in social behaviour • consequences of environmental change
  • 30.
  • 31.
  • 32. Big data is invading biology
  • 35. BIG
  • 36. Big data is invading biology • Genomics • Cancer genomics • Biodiversity assessments • Stool microbiome sequencing • Personalized medicine • Sensor networks - e.g tracking microclimates, recording sounds • Huge medical studies • Aerial surveys (Drones) - e.g. crop productivity; rainforest cover • Camera traps
  • 37.
  • 38. Learning to deal with big data takes time • Your work last year + at home this year + our 8 hours of practicals. • QM’s MSc Programs • Bioinformatics (for biologists) • Ecological & Evolutionary Genomics (or Biodiversity Informatics) • EECS: also have some.
  • 39.
  • 40. Practicals • Aim: get relevant data handling skills • Doing things by hand: • impossible? • slow, • error-prone, • Automate! • Basic programming • in R • no stats!
  • 42. Practicals: contents • Groups - ok? • First 3h practical • data accessing/subsetting • search/replace • regular expressions • Second 3h practical • functions • loops • Third session: • 1.5h practical (integrating & revising all skills) • 1.5h exam Text search on steroids Reusable pieces of work Repeating the same thing many times
  • 43.
  • 45. • create a variable that contains the number 35 • create a variable that contains the string “I love tofu” • give me a vector containing the sequence of numbers from 5 to 11 • access the second number • replace the second number with 42 • add 5 to the second number • now add 5 to all numbers • now add an extra number: 1999 • can you sum all the numbers?
  • 46. • creating a vector > my_vector <- c(5, 6, 7, 8, 9, 10, 11) > my_vector <- 5:11 > my_vector <- seq(from=5, to=11, by=1) > my_vector [1] 5 6 7 8 9 10 11 > (10 > 30)
 [1] FALSE > my_vector > 8
 [1] FALSE FALSE FALSE FALSE TRUE TRUE TRUE > my_vector[my_vector > 8]
 9 10 11 > other_vector <- my_vector[my_vector > 8] > other_vector 9 10 11 > other_vector + 3 • give me a vector containing numbers from 5 to 11 (3 variant
  • 47. • accessing a subset • of a vector > big_vector <- 150:100 > big_vector [1] 150 149 148 147 146 145 144 143 142 141 140 139 138 137 136 1 [20] 131 130 129 128 127 126 125 124 123 122 121 120 119 118 117 1 [39] 112 111 110 109 108 107 106 105 104 103 102 101 100 > big_vector[5] 5 > mysubset <- big_vector[my_vector] > mysubset [1] 146 145 144 143 142 141 140 > big_vector > 130 [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [13] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE F [25] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE F [37] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE F [49] FALSE FALSE FALSE > subset(big_vector, big_vector > 140) [1] 150 149 148 147 146 145 144 143 142 141 > big_vector[big_vector >= 140] [1] 150 149 148 147 146 145 144 143 142 141 140 > my_vector [1] 5 6 7 8 9 10 11
  • 48. Regular expressions (regex): Text search on steroids.
  • 50.
  • 51.
  • 52. Regular expressions (regex): Text search on steroids. Regular expression Finds David David Dav(e|(id)) David, Dave Dav(e|(id)|(ide)|o) David, Dave, Davide, Davo At{1,2}enborough Attenborough, Atenborough Atte[nm]borough Attenborough, Attemborough At{1,2}[ei][nm]bo{0,1}ro((ugh)|w){0,1} Atimbro,
 attenbrough, ateinborow Easy counting, replacing all with “Sir David Attenborough”
  • 53. Regex special symbols Regular expression Finds Example [aeiou] any single vowel “e” [aeiou]* between 0 and infinity vowels vowels, e.g.’ “eeooouuu" [aeoiu]{1,3} between 1 and 3 vowels “oui” a|i one of the 2 characters “" ((win)|(fail)) one of the two 
 words in () fail
  • 54. More Regex Special symbols • Google “Regular expression cheat sheet” • ?regexp Synonymous with [:digit:] [0-9] [A-z] [A-z], ie [A-Za-z] s whitespace . any single character .+ one to many of anything b* between 0 and infinity letter ‘b’ [^abc] any character other than a, b or c. ( ( [:punct:] any of these: ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ ] ^ _ ` { |