handout: https://nhm-stars.github.io/materials/day04/collab_gh_intro.html




Session Roadmap


1 Introductions

- get to know github (25 mins)

  • github as a computational research tool



2 Get stuck in

- Version control with github and rstudio (30 mins)

  • In this session, we are going to get you started with using version control from within RStudio.

  • The material is self-paced and includes a worked-example. It is suggested that you work through the sections in order.

- Collaborative github through rstudio #EvoLottery (40 mins)

  • In this exercise, each participant will fork a github repo, and contribute a file required to simulate the evolutionary trajectory of an imaginary species’ body size.

  • We’ll use github to collate all species files and plot them all up together at the end! We’ll also discover the skull and beak shapes associated with each simulated species size.




Version Control

version control examples

  • Numbering of book editions
  • Wikipedia’s Page history

  • Your thesis!
    • mythesis_draft.docx
    • mythesis_final.docx
    • mythesis_final_from_supervisor.docx
    • mythesis_final_from_supervisor_corrected.docx
    • etc. ad infinitum


version control and computing

"The need for a logical way to organize and control revisions has existed for almost as long as writing has existed, but revision control became much more important, and complicated, when the era of computing began."


version control technologies

GitHub

  • Relies on the open-source version control system Git

    • originally designed by Linus Torvalds for the development of the Linux kernel
    • now developed and maintained by the Git community
  • Much more effcient workflow:

    • revisions are associated with a timestamp person making the change.
    • only changes recorded rather than full copy of new file.
    • enables reverting to a previous version
  • More than a simple source code hosting service.

    • Provides a dynamic and collaborative social coding platform



modern science workflows

can be overwhelming



Next Generation Science demands

  • science increasingly computational

    demands for increased openness, transparency & reproducibility

  • science always benefits from collaboration

    push to harness the power of the internet


class: inverse, center, middle

GitHub for science

***

  • ideal for managing the full suite of research outputs such as datasets, statistical code, figures, lab notes, and manuscripts.
  • supports peer review, commenting, and discussion.
  • Diverse range of efforts, from individual to large bioinformatics projects, laboratory repositories, as well as global collaborations have found a home on GitHub


class: inverse, center, middle

GitHub features




commits

traceability


issues

project management


graphs

project & team tracking

tracking contributors

class: inverse, center, middle

entire process of project evolution reproducible




Practical 1: Github & Rstudio for version control

Practical adapted from Code Cafe Style tutorial by Mike Croucher that will get you set up with all required software and able to link rstudio projects to github repos.

Practical 2: Github & Rstudio for collaborative coding

#EvoLottery

Beak and skull shapes in birds of prey (“raptors”) are strongly coupled and largely controlled by size.

  • In this exercise, each participant will fork a github repo, and contribute a file required to simulate the evolutionary trajectory of an imaginary species’ body size.

  • We’ll use github to collate all species files and plot them all up together at the end! We’ll also discover the skull and beak shapes associated with each simulated species size.

GitHub amazing for:

  • fostering reproducibility

  • empowering collaboration



GitHub tips


  • Use README to provide an overview of your project
  • commit early, commit often
  • write meaninful messages
  • use issues to keep track of bugs, tasks, and enhancements
  • include a LICENSE
  • practice by collaborating with yourself on different machines!
  • handy github glossary




Further resources

Getting started with GitHub from materials for a software carpentry course at UBC

Slides for lecture Karl Broman gave on git/github, with notes

joeyklee’s friendly github intro. Mozilla Science Lab workshop