diff --git a/about.html b/about.html index c319452..63c1153 100644 --- a/about.html +++ b/about.html @@ -124,7 +124,7 @@

About

Published
-

30 September, 2023

+

2 October, 2023

diff --git a/core/core.html b/core/core.html index c9f2403..83ff6b9 100644 --- a/core/core.html +++ b/core/core.html @@ -247,7 +247,7 @@

On this page

  • Content
  • @@ -269,7 +269,7 @@

    Core Data Analysis

    Published
    -

    30 September, 2023

    +

    2 October, 2023

    @@ -285,19 +285,12 @@

    Content

    Good organisation is important because you will want to be able to set work aside for holidays and assessment periods and then restart easily. You will also be assessed on the organisation, reproducibility and transparency of your work.

    Week 1 Core 1 Organising reproducible data analyses

    -

    This week you will revise some essential concepts for scientific computing: file system organisation, file types, working directories and paths. The workshop will cover a rationale for working reproducibly, project oriented workflow, naming things and documenting your work. We will also examine some file types and the concept of tidy data.

    +

    This week you will revise some essential concepts for scientific computing: file system organisation, file types, working directories and paths. The workshop will cover a rationale for working reproducibly, project oriented workflow, naming things and documenting your work.

    -
    -

    Week 2 Core 2 Workflow tips

    +
    +

    Week 2 Core 2 File types, workflow tips and other tools

    - - - - - - -
    diff --git a/core/week-1/overview.html b/core/week-1/overview.html index 32e7250..0248c15 100644 --- a/core/week-1/overview.html +++ b/core/week-1/overview.html @@ -266,7 +266,7 @@

    Overview

    Published
    -

    30 September, 2023

    +

    2 October, 2023

    diff --git a/core/week-1/study_after_workshop.html b/core/week-1/study_after_workshop.html index b37c663..a7dc626 100644 --- a/core/week-1/study_after_workshop.html +++ b/core/week-1/study_after_workshop.html @@ -266,7 +266,7 @@

    Independent Study to consolidate this week

    Published
    -

    30 September, 2023

    +

    2 October, 2023

    diff --git a/core/week-1/study_before_workshop.html b/core/week-1/study_before_workshop.html index d2aecdb..b9dffdf 100644 --- a/core/week-1/study_before_workshop.html +++ b/core/week-1/study_before_workshop.html @@ -259,7 +259,7 @@

    Independent Study to prepare for workshop

    Published
    -

    30 September, 2023

    +

    2 October, 2023

    diff --git a/core/week-1/workshop.html b/core/week-1/workshop.html index e78d26d..1904a9e 100644 --- a/core/week-1/workshop.html +++ b/core/week-1/workshop.html @@ -319,7 +319,7 @@

    Workshop

    Published
    -

    30 September, 2023

    +

    2 October, 2023

    diff --git a/core/week-2/images/JennyBryan.jpg b/core/week-2/images/JennyBryan.jpg new file mode 100644 index 0000000..f233139 Binary files /dev/null and b/core/week-2/images/JennyBryan.jpg differ diff --git a/core/week-2/overview.html b/core/week-2/overview.html index ad30d64..b4342f6 100644 --- a/core/week-2/overview.html +++ b/core/week-2/overview.html @@ -246,7 +246,7 @@

    Overview

    -

    Core 2: Workflow tips

    +

    Core 2: File types, workflow tips and other tools

    @@ -257,7 +257,7 @@

    Overview

    Published
    -

    30 September, 2023

    +

    2 October, 2023

    @@ -267,33 +267,36 @@

    Overview

    -

    xxxxx

    +

    This week

    Learning objectives

    +

    The successful student will be able to:

      -
    • dd
    • -
    • dd.
    • -
    • dd
    • -
    • d
    • +
    • explain why RStudio are useful/essential and be able to use the usethis package
    • +
    • write cool 😎 code not 😩 ugly code
    • +
    • explain the value of code which expresses the structure of the problem/solution.
    • +
    • describe some common file types for biological data
    • +
    • use some useful shortcuts to help write cool 😎 code
    • +
    • know what the command line is and how to use it for simple tasks
    • +
    • use Google colab to run code
    • +
    • recognise some of the differences between R and Python

    Instructions

      -
    1. Prepare

      -
        -
      1. πŸ“– Read
      2. -
    2. +
    3. Prepare 20 mins reading on RStudio Projects revisited, formatting code and coding algorithmically

    4. Workshop

        -
      1. πŸ’» dd.

      2. -
      3. πŸ’» ddd

      4. -
      5. πŸ’» ddd

      6. +
      7. πŸ’¬ Types of biological data files

      8. +
      9. πŸͺ„ Workflow tips and shortcuts

      10. +
      11. πŸ’» The command line

      12. +
      13. πŸ’» Google colab

      14. +
      15. πŸ’» Python

    5. Consolidate

        -
      1. πŸ’» dd

      2. -
      3. πŸ’» dd

      4. +
      5. πŸ’» not sure yet :)
    diff --git a/core/week-2/study_after_workshop.html b/core/week-2/study_after_workshop.html index b988c41..d43220d 100644 --- a/core/week-2/study_after_workshop.html +++ b/core/week-2/study_after_workshop.html @@ -1,10 +1,13 @@ - + + + + Data Analysis for Group Project - Independent Study to consolidate this week + @@ -69,7 +39,8 @@ - +} + + + +
    -
    +
    + +
    - +
    -
    +
    + +
    +

    Independent Study to consolidate this week

    Core 2

    @@ -270,7 +257,7 @@

    Independent Study to consolidate this week

    Published
    -

    30 September, 2023

    +

    2 October, 2023

    @@ -278,18 +265,16 @@

    Independent Study to consolidate this week

    -

    Set up

    -

    If you have just opened RStudio you will want to load the packages and import the data.

    - -
      -
    1. πŸ’» xx.
    2. -
    + + +
    +

    bbbb

    -
    - + \ No newline at end of file diff --git a/core/week-2/study_before_workshop.html b/core/week-2/study_before_workshop.html index 5746f59..6152061 100644 --- a/core/week-2/study_before_workshop.html +++ b/core/week-2/study_before_workshop.html @@ -1,552 +1,1209 @@ - - + + + + + + + + + - - - - Data Analysis for Group Project - Independent Study to prepare for workshop + + + + + - - - - - - - - - - - - - - - - - - - - - - + code{white-space: pre-wrap;} + span.smallcaps{font-variant: small-caps;} + div.columns{display: flex; gap: min(4vw, 1.5em);} + div.column{flex: auto; overflow-x: auto;} + div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} + ul.task-list{list-style: none;} + ul.task-list li input[type="checkbox"] { + width: 0.8em; + margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */ + vertical-align: middle; + } + /* CSS for syntax highlighting */ + pre > code.sourceCode { white-space: pre; position: relative; } + pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } + pre > code.sourceCode > span:empty { height: 1.2em; } + .sourceCode { overflow: visible; } + code.sourceCode > span { color: inherit; text-decoration: inherit; } + div.sourceCode { margin: 1em 0; } + pre.sourceCode { margin: 0; } + @media screen { + div.sourceCode { overflow: auto; } + } + @media print { + pre > code.sourceCode { white-space: pre-wrap; } + pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } + } + pre.numberSource code + { counter-reset: source-line 0; } + pre.numberSource code > span + { position: relative; left: -4em; counter-increment: source-line; } + pre.numberSource code > span > a:first-child::before + { content: counter(source-line); + position: relative; left: -1em; text-align: right; vertical-align: baseline; + border: none; display: inline-block; + -webkit-touch-callout: none; -webkit-user-select: none; + -khtml-user-select: none; -moz-user-select: none; + -ms-user-select: none; user-select: none; + padding: 0 4px; width: 4em; + color: #aaaaaa; + } + pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } + div.sourceCode + { color: #003b4f; background-color: #f1f3f5; } + @media screen { + pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } + } + code span { color: #003b4f; } /* Normal */ + code span.al { color: #ad0000; } /* Alert */ + code span.an { color: #5e5e5e; } /* Annotation */ + code span.at { color: #657422; } /* Attribute */ + code span.bn { color: #ad0000; } /* BaseN */ + code span.bu { } /* BuiltIn */ + code span.cf { color: #003b4f; } /* ControlFlow */ + code span.ch { color: #20794d; } /* Char */ + code span.cn { color: #8f5902; } /* Constant */ + code span.co { color: #5e5e5e; } /* Comment */ + code span.cv { color: #5e5e5e; font-style: italic; } /* CommentVar */ + code span.do { color: #5e5e5e; font-style: italic; } /* Documentation */ + code span.dt { color: #ad0000; } /* DataType */ + code span.dv { color: #ad0000; } /* DecVal */ + code span.er { color: #ad0000; } /* Error */ + code span.ex { } /* Extension */ + code span.fl { color: #ad0000; } /* Float */ + code span.fu { color: #4758ab; } /* Function */ + code span.im { color: #00769e; } /* Import */ + code span.in { color: #5e5e5e; } /* Information */ + code span.kw { color: #003b4f; } /* Keyword */ + code span.op { color: #5e5e5e; } /* Operator */ + code span.ot { color: #003b4f; } /* Other */ + code span.pp { color: #ad0000; } /* Preprocessor */ + code span.sc { color: #5e5e5e; } /* SpecialChar */ + code span.ss { color: #20794d; } /* SpecialString */ + code span.st { color: #20794d; } /* String */ + code span.va { color: #111111; } /* Variable */ + code span.vs { color: #20794d; } /* VerbatimString */ + code span.wa { color: #5e5e5e; font-style: italic; } /* Warning */ + /* CSS for citations */ + div.csl-bib-body { } + div.csl-entry { + clear: both; + } + .hanging-indent div.csl-entry { + margin-left:2em; + text-indent:-2em; + } + div.csl-left-margin { + min-width:2em; + float:left; + } + div.csl-right-inline { + margin-left:2em; + padding-left:1em; + } + div.csl-indent { + margin-left: 2em; + } + + + + + + + + + + + + +
    +
    - +

    Independent Study to prepare for workshop

    +

    Core 2: File types, workflow tips and other tools

    -
    -
    -

    Overview

    +
      +
    • RStudio Projects revisited +
        +
      • using usethis package
      • +
      • Adding a README
      -
      - - -
      -
    -
    - - - - -
    - -

    Reproducibility is a continuum

    +

    Some is better than none!

    +
      +
    • Organise your project
    • -
    • Script everything.
    • -
    • Format code and follow a consistent style.
    • -
    • Code algorithmically
    • +
    • Modularise your code: organise into sections and scripts
    • +
    • Document your project - commenting, READMEs
    • +
    • Use literate programming e.g., R Markdown or Quarto
    • +
    +
    +
      +
    • More advanced: Version control, continuous integration, environments, containers
    • +
    +
    +

    RStudio Projects revisited

    + +

    RStudio Projects

    +
    +
      +
    • We used RStudio Projects in stage one but they are so useful, it is worth covering them again in case you are not yet using them.

    • +
    • We will also cover the usethisworkflow to create an RStudio Project.

    • +
    • RStudio Projects make it easy to manage working directories and paths because they set the working directory to the RStudio Projects directory automatically.

    • +
    +
    +

    RStudio Projects

    +
    +
    +
    +
    -- stem_cell_rna
    +   |__stem_cell_rna.Rproj   
    +   |__raw_ data/            
    +      |__2019-03-21_donor_1.csv
    +   |__README. md
    +   |__R/
    +      |__01_data_processing.R
    +      |__02_exploratory.R
    +      |__functions/
    +         |__theme_volcano.R
    +         |__normalise.R
    +
    +
    +

    The project directory is the folder at the top 1

    +
    +
    +

    RStudio Projects

    +
    +
    +
    +
    -- stem_cell_rna
    +   |__stem_cell_rna.Rproj   
    +   |__raw_ data/            
    +      |__2019-03-21_donor_1.csv
    +   |__README. md
    +   |__R/
    +      |__01_data_processing.R
    +      |__02_exploratory.R
    +      |__functions/
    +         |__theme_volcano.R
    +         |__normalise.R
    +
    +
    +

    the .RProj file is directly under the project folder. Its presence is what makes the folder an RStudio Project

    +
    +
    +

    RStudio Projects

    +
    +
      +
    • When you open an RStudio Project, the working directory is set to the Project directory (i.e., the location of the .Rproj file).

    • +
    • When you use an RStudio Project you do not need to use setwd()

    • +
    • When someone, including future you, opens the project on another machine, all the paths just work.

    • +
    +
    +

    RStudio Projects

    + +

    Jenny Bryan

    In the words of Jenny Bryan:

    +
    +

    β€œIf the first line of your R script is setwd(”C:/Users/jenny/path/that/only/I/have”) I will come into your office and SET YOUR COMPUTER ON FIRE”

    +
    +

    Creating an RStudio Project

    +

    There are two ways to create an RStudio Project.

    +
      +
    1. Using one of the two menus

    2. +
    3. Using the usethis package

    4. +

    Using a menu

    +

    There are two menus:

    +
      +
    1. Top left, File menu

    2. +
    3. Top Right, drop-down indicated by the .RProj icon

    4. +
    +

    They both do the same thing.

    +

    In both cases you choose: New Project | New Directory | New Project

    +
    +

    Make sure you β€œBrowse” to the folder you want to create the project.

    +
    +

    Using the usethis package

    + +

    Using the usethis package

    +

    I occasionally use the menu but I mostly use the usethis package.

    +
    +

    🎬 Go to RStudio and check your working directory:

    +
    + +
    +

    "C:/Users/er13/Desktop"

    +
    +
    +

    ❔ Is your working directory a good place to create a Project folder?

    +
    +

    Using the usethis package

    +

    If this is a good place to create a Project directory then…

    +

    🎬 Create a project with:

    +
    +
    usethis::create_project("bananas")
    +
    +

    Using the usethis package

    +

    Otherwise

    +

    If you want the project directory elsewhere, you will need to give the relative path, e.g.

    +
    +
    usethis::create_project("../Documents/bananas")
    +
    +

    Using the usethis package

    +

    The output will look like this and a new RStudio session will start.

    +
    > usethis::create_project("bananas")
    +√ Creating 'bananas/'
    +√ Setting active project to 'C:/Users/er13/Desktop/bananas'
    +√ Creating 'R/'
    +√ Writing 'bananas.Rproj'
    +√ Adding '.Rproj.user' to '.gitignore'
    +√ Opening 'C:/Users/er13/Desktop/bananas/' in new RStudio session
    +√ Setting active project to '<no active project>'
    +

    Using the usethis package

    +

    When you create a new RStudio Project with usethis:

    +
    +
      +
    • A folder called bananas/ is created
    • +
    • RStudio starts a new session in bananas/ i.e., your working directory is now bananas/
    • -
    - -
  • -
    +

    Using the usethis package

    +
    +
      +
    • the .Rproj file is what makes the directory an RStudio Project

    • +
    • the Rproj.user directory is where project-specific temporary files are stored. You don’t need to mess with it.

    • +
    • the .gitignore is used for version controlled projects. If not using git, you can ignore it.

    • +
    +
    +

    Opening and closing

    +

    You can close an RStudio Project with ONE of:

    +
      +
    1. File | Close Project
    2. +
    3. Using the drop-down option on the far right of the tool bar where you see the Project name
    4. +
    +
    +

    You can open an RStudio Project with ONE of:

    +
      +
    1. File | Open Project or File | Recent Projects
    2. -
    3. Using the drop-down option on the far right of the tool bar where you see the Project name
    4. -
    5. Double-clicking an .Rproj file from your file explorer/finder
    6. +
    +

    When you open project, a new R session starts.

    +
    +

    Adding a README

    + +

    Using the usethis package

    +

    Once the RStudio project has been created, usethis helps you follow good practice.

    +
    +

    🎬 We can add a README with:

    +
    +
    usethis::use_readme_md()
    +
    +
    +
    +

    This creates a file called README.md, with a little default text, in the Project directory and opens it for editing.

    +
    +
    +

    md stands for markdown, it is a extremely widely used text formatting language which is readable as plain text. If you have ever used asterisks to make text bold or italic, you have used markdown.

    +
    +

    Code formatting and style

    + +

    Code formatting and style

    +
    +

    β€œGood coding style is like correct punctuation: you can manage without it, butitsuremakesthingseasiertoread.”

    +
    +

    The tidyverse style guide

    +

    Code formatting and style

    +

    We have all written code which is hard to read!

    +

    We all improve over time.

    +
    +
    + + +
    +
    +

    Code formatting and style

    +

    Some keys points:

    +
      +
    • be consistent, emulate experienced coders
    • -
    • use snake_case for variable names (not CamelCase, dot.case)
    • -
    - -
  • - - - - -
    - - - -
    +
  • use " for quoting text (not ') unless the text contains double quotes
  • +

    😩 Ugly code 😩

    +
    +
    data<-read_csv('../data-raw/Y101_Y102_Y201_Y202_Y101-5.csv',skip=2)
    +library(janitor);sol<-clean_names(data)
    +data=data|>filter(str_detect(description,"OS=Homo sapiens"))|>filter(x1pep=='x')
    +data=data|>
    +mutate(g=str_extract(description,
    +"GN=[^\\s]+")|>str_replace("GN=",''))
    +data<-data|>mutate(id=str_extract(accession,"1::[^;]+")|>str_replace("1::",""))
    +
    +

    😩 Ugly code 😩

    +
      +
    • no spacing or indentation
    • +
    • inconsistent splitting of code blocks over lines
    • +
    • inconsistent use of quote characters
    • +
    • no comments
    • +
    • variable names convey no meaning
    • +
    • use of = for assignment and inconsistently
    • +
    • multiple commands on a line
    • +
    • library statement in the middle of the analysis
    • +

    😎 Cool code 😎

    +
    +
    # Packages ----------------------------------------------------------------
    +library(tidyverse)
    +library(janitor)
    +
    +# Import ------------------------------------------------------------------
    +
    +# define file name
    +file <- "../data-raw/Y101_Y102_Y201_Y202_Y101-5.csv"
    +
    +# import: column headers and data are from row 3
    +solu_protein <- read_csv(file, skip = 2) |>
    +  janitor::clean_names()
    +
    +# Tidy data ----------------------------------------------------------------
    +
    +# filter out the bovine proteins and those proteins 
    +# identified from fewer than 2 peptides
    +solu_protein <- solu_protein |>
    +  filter(str_detect(description, "OS=Homo sapiens")) |>
    +  filter(x1pep == "x")
    +
    +# Extract the genename from description column to a column
    +# of its own
    +solu_protein <- solu_protein |>
    +  mutate(genename =  str_extract(description,"GN=[^\\s]+") |>
    +           str_replace("GN=", ""))
    +
    +# Extract the top protein identifier from accession column (first
    +# Uniprot ID after "1::") to a column of its own
    +solu_protein <- solu_protein |>
    +  mutate(protid =  str_extract(accession, "1::[^;]+") |>
    +           str_replace("1::", ""))
    +
    +

    😎 Cool code 😎

    +
      +
    • library() calls collected

    • +
    • Uses code sections to make it easier to navigate

    • +
    • Uses white space and proper indentation

    • +
    • Commented

    • +
    • Uses more informative name for the dataframe

    • +

    Code β€˜algorithmically’

    -
    -
    -

    Independent Study to prepare for workshop

    -

    Core 2

    +

    Code β€˜algorithmically’

    +
    +
      +
    • Write code which expresses the structure of the problem/solution.

    • +
    • Avoid hard coding numbers if at all possible - declare variables instead

    • +
    • Declare frequently used values as variables at the start e.g., colour schemes, figure saving settings

    • +
    +
    +

    😩 Hard coding numbers.

    +
    +
      +
    • Suppose we want to calculate the sums of squares, \(SS(x)\), for the number of eggs in five nests.

    • +
    • The formula is given by: \(\sum (x_i- \bar{x})^2\)

    • +
    • We could calculate the mean and copy it, and the individual numbers into the formula

    • +
    +
    +

    😩 Hard coding numbers.

    +
    +
    # mean number of eggs per nest
    +sum(3, 5, 6, 7, 8) / 5
    +
    +
    [1] 5.8
    +
    +
    # ss(x) of number of eggs
    +(3 - 5.8)^2 + (5 - 5.8)^2 + (6 - 5.8)^2 + (7 - 5.8)^2 + (8 - 5.8)^2
    +
    +
    [1] 14.8
    +
    +
    +

    I am coding the calculation of the mean rather using the mean() function only to explain what β€˜coding algorithmically’ means using a simple example.

    +

    😩 Hard coding numbers

    +
    +
      +
    • if any of the sample numbers must be altered, all the code needs changing

    • +
    • it is hard to tell that the output of the first line is a mean

    • +
    • its hard to recognise that the numbers in the mean calculation correspond to those in the next calculation

    • +
    • it is hard to tell that 5 is just the number of nests

    • +
    • no way of know if numbers are the same by coincidence or they refer to the same thing

    • +
    +
    +

    😎 Better

    +
    +
    # eggs each nest
    +eggs <- c(3, 5, 6, 7, 8)
    +
    +# mean eggs per nest
    +mean_eggs <- sum(eggs) / length(eggs)
    +
    +# ss(x) of number of eggs
    +sum((eggs - mean_eggs)^2)
    +
    +
    [1] 14.8
    +
    +
    +

    😎 Better

    +
    +
      +
    • the commenting is similar but it is easier to follow

    • +
    • if any of the sample numbers must be altered, only that number needs changing

    • +
    • assigning a value you will later use to a variable with a meaningful name allows us to understand the first and second calculations

    • +
    • makes use of R’s elementwise calculation which resembles the formula (i.e., is expressed as the general rule)

    • +
    +

    Summary

    +
    +
      +
    • Use an RStudio project for any R work (you can also incorporate other languages)

    • +
    • Write Cool code not Ugly code: space, consistency, indentation, comments, meaningful variable names

    • +
    • Write code which expresses the structure of the problem/solution.

    • +
    • Avoid hard coding numbers if at all possible - declare variables instead

    • +
    +
    +

    Reading

    +

    Recommended if you still need convincing to use RStudio Projects

    + +

    Completely optional suggestions for further reading

    +
      +
    • Ten simple rules for reproducible computational research (Sandve et al. 2013) +
    • +
    • Good enough practices in scientific computing (Wilson et al. 2017) +
    • +
    • Excuse Me, Do You Have a Moment to Talk About Version Control? (Bryan 2018) +
    • +

    References

    + +
    +
    +Bryan, Jennifer. 2018. β€œExcuse Me, Do You Have a Moment to Talk about Version Control?” Am. Stat. 72 (1): 20–27. https://doi.org/10.1080/00031305.2017.1399928. +
    +
    +Bryan, Jennifer, Jim Hester, Shannon Pileggi, and E. David Aja. n.d. What They Forgot to Teach You about r. https://rstats.wtf/. +
    +
    +Sandve, Geir Kjetil, Anton Nekrutenko, James Taylor, and Eivind Hovig. 2013. β€œTen Simple Rules for Reproducible Computational Research.” PLoS Comput. Biol. 9 (10): e1003285. https://doi.org/10.1371/journal.pcbi.1003285. +
    +
    +Wilson, Greg, Jennifer Bryan, Karen Cranston, Justin Kitzes, Lex Nederbragt, and Tracy K Teal. 2017. β€œGood Enough Practices in Scientific Computing.” PLoS Comput. Biol. 13 (6): e1005510. https://doi.org/10.1371/journal.pcbi.1005510. +
    +
    +
    + + + - - - + const findCites = (el) => { + const parentEl = el.parentElement; + if (parentEl) { + const cites = parentEl.dataset.cites; + if (cites) { + return { + el, + cites: cites.split(' ') + }; + } else { + return findCites(el.parentElement) + } + } else { + return undefined; + } + }; + var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]'); + for (var i=0; i \ No newline at end of file diff --git a/core/week-2/workshop.html b/core/week-2/workshop.html index 179f986..251cb9e 100644 --- a/core/week-2/workshop.html +++ b/core/week-2/workshop.html @@ -18,6 +18,40 @@ margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */ vertical-align: middle; } +/* CSS for syntax highlighting */ +pre > code.sourceCode { white-space: pre; position: relative; } +pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } +pre > code.sourceCode > span:empty { height: 1.2em; } +.sourceCode { overflow: visible; } +code.sourceCode > span { color: inherit; text-decoration: inherit; } +div.sourceCode { margin: 1em 0; } +pre.sourceCode { margin: 0; } +@media screen { +div.sourceCode { overflow: auto; } +} +@media print { +pre > code.sourceCode { white-space: pre-wrap; } +pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } +} +pre.numberSource code + { counter-reset: source-line 0; } +pre.numberSource code > span + { position: relative; left: -4em; counter-increment: source-line; } +pre.numberSource code > span > a:first-child::before + { content: counter(source-line); + position: relative; left: -1em; text-align: right; vertical-align: baseline; + border: none; display: inline-block; + -webkit-touch-callout: none; -webkit-user-select: none; + -khtml-user-select: none; -moz-user-select: none; + -ms-user-select: none; user-select: none; + padding: 0 4px; width: 4em; + } +pre.numberSource { margin-left: 3em; padding-left: 4px; } +div.sourceCode + { } +@media screen { +pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } +} /* CSS for citations */ div.csl-bib-body { } div.csl-entry { @@ -248,7 +282,26 @@ Introduction + +
  • +File formats + +
  • +
  • +The command line + +
  • +
  • Google Colab
  • +
  • +Python +
  • πŸ₯³ Well Done! πŸŽ‰
  • @@ -260,7 +313,7 @@

    Workshop

    -

    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    +

    File types, workflow tips and other tools

    @@ -277,7 +330,7 @@

    Workshop

    Published
    -

    30 September, 2023

    +

    2 October, 2023

    @@ -288,17 +341,80 @@

    Workshop

    Introduction

    Session overview

    In this workshop you will

    -

    File formats

    -

    Data files. - Sequences data - Image data - Structure data PDB/mmCIF www.pdb.org

    +

    File formats

    +

    Types of Data files. - Sequences data - Image data - Structure data PDB/mmCIF www.pdb.org

    Similarities and differences

    +

    Getting started

    +

    Make a new RStudio project (use the workflow from in the independent study

    +

    Tips

    +

    multiple cursors

    +

    open a file

    +

    the command pallette,

    +

    segmenting code

    +

    to correct indentation CONTROL+i

    +

    to reformat code CONTROL+SHIFT+A Not perfect but corrects spacing, indentation, multiple commands on lines and assignment with =

    +

    to comment and uncomment lines CONTROL+SHIFT+C

    +

    show the margin Tools | Global Options | Code

    +

    restart R

    +

    The command line

    +

    The command line - or shell - is a text interface for your computer. It’s a program that takes in commands, which it passes on to the computer’s operating system to run.

    +

    RStudio terminal

    +

    The RStudio terminal is a convenient interface to the shell without leaving RStudio. It is useful for running commands that are not available in R. For example, you can use it to run other programs like fasqc, git, ftp, ssh

    +
    +
    pwd
    +
    +
    /home/runner/work/BIO00088H-data/BIO00088H-data/core/week-2
    +
    +
    +
    +
    ls
    +
    +
    chalkboard.json
    +images
    +overview.qmd
    +study_after_workshop.qmd
    +study_before_workshop.html
    +study_before_workshop.ipynb
    +study_before_workshop.qmd
    +workshop.qmd
    +workshop.rmarkdown
    +
    +
    +
    +
    ls -l
    +
    +
    total 140
    +-rw-r--r-- 1 runner docker 21116 Oct  2 16:27 chalkboard.json
    +drwxr-xr-x 2 runner docker  4096 Oct  2 16:27 images
    +-rw-r--r-- 1 runner docker  1096 Oct  2 16:27 overview.qmd
    +-rw-r--r-- 1 runner docker   184 Oct  2 16:27 study_after_workshop.qmd
    +-rw-r--r-- 1 runner docker 69876 Oct  2 16:34 study_before_workshop.html
    +-rw-r--r-- 1 runner docker  4807 Oct  2 16:27 study_before_workshop.ipynb
    +-rw-r--r-- 1 runner docker 13029 Oct  2 16:27 study_before_workshop.qmd
    +-rw-r--r-- 1 runner docker  2396 Oct  2 16:27 workshop.qmd
    +-rw-r--r-- 1 runner docker  2400 Oct  2 16:34 workshop.rmarkdown
    +
    +
    +
    +
    ls -F
    +
    +
    chalkboard.json
    +images/
    +overview.qmd
    +study_after_workshop.qmd
    +study_before_workshop.html
    +study_before_workshop.ipynb
    +study_before_workshop.qmd
    +workshop.qmd
    +workshop.rmarkdown
    +
    +
    +

    Google Colab

    +

    Python

    +

    Differences between R and python

    +

    Quarto note books

    +

    zotero

    🎬

    -

    what is markdown

    -

    Google Colab

    -

    snippets

    -

    python

    -

    differences between r and python

    -

    rstudio terminal

    -

    basic bash

    You’re finished!

    πŸ₯³ Well Done! πŸŽ‰

    Independent study following the workshop

    diff --git a/core/week-6/overview.html b/core/week-6/overview.html index b234303..63d60e4 100644 --- a/core/week-6/overview.html +++ b/core/week-6/overview.html @@ -257,7 +257,7 @@

    Overview

    Published
    -

    30 September, 2023

    +

    2 October, 2023

    diff --git a/core/week-6/study_after_workshop.html b/core/week-6/study_after_workshop.html index cd23d1e..2037bc3 100644 --- a/core/week-6/study_after_workshop.html +++ b/core/week-6/study_after_workshop.html @@ -270,7 +270,7 @@

    Independent Study to consolidate this week

    Published
    -

    30 September, 2023

    +

    2 October, 2023

    diff --git a/core/week-6/study_before_workshop.html b/core/week-6/study_before_workshop.html index ba0765a..1fd5701 100644 --- a/core/week-6/study_before_workshop.html +++ b/core/week-6/study_before_workshop.html @@ -257,7 +257,7 @@

    Independent Study to prepare for workshop

    Published
    -

    30 September, 2023

    +

    2 October, 2023

    diff --git a/core/week-6/workshop.html b/core/week-6/workshop.html index a9e433d..d35947e 100644 --- a/core/week-6/workshop.html +++ b/core/week-6/workshop.html @@ -278,7 +278,7 @@

    Workshop

    Published
    -

    30 September, 2023

    +

    2 October, 2023

    diff --git a/index.html b/index.html index 57b6ead..c289de0 100644 --- a/index.html +++ b/index.html @@ -120,7 +120,7 @@

    Data Analysis for the Group Research Project

    Published
    -

    30 September, 2023

    +

    2 October, 2023

    diff --git a/omics/omics.html b/omics/omics.html index f4e88a7..e561b47 100644 --- a/omics/omics.html +++ b/omics/omics.html @@ -269,7 +269,7 @@

    Omics Data Analysis for Group Project

    Published
    -

    30 September, 2023

    +

    2 October, 2023

    diff --git a/omics/week-3/overview.html b/omics/week-3/overview.html index f02ae26..bd66a3d 100644 --- a/omics/week-3/overview.html +++ b/omics/week-3/overview.html @@ -257,7 +257,7 @@

    Overview

    Published
    -

    30 September, 2023

    +

    2 October, 2023

    diff --git a/omics/week-3/study_after_workshop.html b/omics/week-3/study_after_workshop.html index 6375b04..3e3a4d1 100644 --- a/omics/week-3/study_after_workshop.html +++ b/omics/week-3/study_after_workshop.html @@ -257,7 +257,7 @@

    Independent Study to consolidate this week

    Published
    -

    30 September, 2023

    +

    2 October, 2023

    diff --git a/omics/week-3/study_before_workshop.html b/omics/week-3/study_before_workshop.html index 9cd6082..b6492f5 100644 --- a/omics/week-3/study_before_workshop.html +++ b/omics/week-3/study_before_workshop.html @@ -53,6 +53,8 @@ + +