Skip to content

Commit

Permalink
Merge pull request #8 from GenomicsAotearoa/revisions_022024
Browse files Browse the repository at this point in the history
Revisions 022024
  • Loading branch information
JSBoey authored Mar 8, 2024
2 parents 0a94b65 + 0cb853b commit be61d0d
Show file tree
Hide file tree
Showing 10 changed files with 1,866 additions and 1,596 deletions.
281 changes: 170 additions & 111 deletions docs/00-introduction.md

Large diffs are not rendered by default.

893 changes: 498 additions & 395 deletions docs/01-r-basics.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/02-data-prelude.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Introduction to the example dataset and file type

!!! info
!!! info "Learning outcomes"

=== "Keypoints"
=== "Key points"

- The dataset comes from a real world experiment in *E. coli*.
- Publicly available FASTQ files can be downloaded from NCBI SRA.
Expand Down
1,212 changes: 620 additions & 592 deletions docs/03-basics-factors-dataframes.md

Large diffs are not rendered by default.

331 changes: 209 additions & 122 deletions docs/06-data-visualization.md

Large diffs are not rendered by default.

14 changes: 6 additions & 8 deletions docs/07-knitr-markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

!!! info

=== "Keypoints"
=== "Key points"

- Keep reporting and R software together in one document using R
Markdown.
Expand Down Expand Up @@ -51,14 +51,14 @@ can just re-compile the report and get the new or corrected results
(versus having to reconstruct figures, paste them into a Word document,
and further hand-edit various detailed results).

The key tool for R is [knitr](http://yihui.name/knitr/), which allows
The key tool for R is [`knitr`](http://yihui.name/knitr/), which allows
you to create a document that is a mixture of text and some chunks of
code. When the document is processed by knitr, chunks of R code will be
code. When the document is processed by `knitr`, chunks of R code will be
executed, and graphs or other results inserted.

This sort of idea has been called "literate programming".

knitr allows you to mix basically any sort of text with any sort of
`knitr` allows you to mix basically any sort of text with any sort of
code, but we recommend that you use R Markdown, which mixes Markdown
with R. Markdown is a light-weight mark-up language for creating web
pages.
Expand All @@ -68,9 +68,7 @@ pages.
Within R Studio, click File → New File → R Markdown and you'll get a
dialog box like this:

<!-- Need to generate the image.
![images]()
-->
![Alt text](figures/open_new_Rmd.png)

You can stick with the default (HTML output), but give it a title.

Expand Down Expand Up @@ -185,7 +183,7 @@ You can make a hyperlink like this:
You can include an image file like this:
`![caption](http://url/for/file)`

You can do subscripts (e.g., F~2~) with `F~2` and superscripts (e.g.,
You can do subscripts (e.g., F~2~) with `F~2~` and superscripts (e.g.,
F^2^) with `F^2^`.

If you know how to write equations in
Expand Down
39 changes: 19 additions & 20 deletions docs/08-r-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

!!! info

=== "Keypoints"
=== "Key points"

- R provides thousands of functions for analyzing data, and provides several way to get help
- Using R will mean searching for online help, and there are tips and resources on how to search effectively
Expand Down Expand Up @@ -55,10 +55,10 @@ Often, in order to duplicate the issue you are having, someone may need
to see the data you are working with or verify the versions of R or R
packages you are using. The following R functions will help with this:

You can **check the version of R** you are working with using the
`sessionInfo()` function. Actually, it is good to save this information
as part of your notes on any analysis you are doing. When you run the
same script that has worked fine a dozen times before, looking back at
You can **check the version of R** (and any loaded packages) you are working
with using the `sessionInfo()` function. Actually, it is good to save this
information as part of your notes on any analysis you are doing. When you run
the same script that has worked fine a dozen times before, looking back at
these notes will remind you that you upgraded R and forget to check your
script.

Expand Down Expand Up @@ -91,12 +91,11 @@ script.
Many times, there may be some issues with your data and the way it is
formatted. In that case, you may want to share that data with someone
else. However, you may not need to share the whole dataset; looking at a
subset of your 50,000 row, 10,000 column dataframe may be TMI (too much
information)! You can take an object you have in memory such as
dataframe (if you don't know what this means yet, we will get to it!)
and save it to a file. In our example we will use the `dput()` function
on the `iris` dataframe which is an example dataset that is installed in
R:
subset of your 50,000 row, 10,000 column data frame may be TMI (too much
information)! You can take an object you have in memory such as a
data frame and save it to a file. In our example we will use the `dput()`
function on the `iris` data frame which is an example dataset that is installed
in R:

!!! r-project "r"

Expand Down Expand Up @@ -163,15 +162,15 @@ them here because they come up commonly:
1:101 # generates the sequence of numbers from 1 to 101
```

!!! success "Output"

```
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
[23] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
[45] 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
[67] 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
[89] 89 90 91 92 93 94 95 96 97 98 99 100 101
```
!!! success "Output"
```
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
[23] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
[45] 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
[67] 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
[89] 89 90 91 92 93 94 95 96 97 98 99 100 101
```

In the output above, `[89]` indicates that the first value on that line
is the 89th item in your result
Expand Down
2 changes: 1 addition & 1 deletion docs/appendix/04-bioconductor-vcfr.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

!!! info

=== "Keypoints"
=== "Keyp oints"

- Bioconductor is an alternative package repository for bioinformatics packages.
- Installing packages from Bioconductor requires a new method, since it is not compatible with the `install.packages()` function used for CRAN.
Expand Down
Loading

0 comments on commit be61d0d

Please sign in to comment.