From bb2bb6b6e795c80d301115407ba6d253a4e7d2b1 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 14 May 2024 20:00:00 +0000 Subject: [PATCH] markdown source builds Auto-generated via {sandpaper} Source : b22497cb97fa18a9f56b9b5c57dcd41879efc3e2 Branch : main Author : Naupaka Zimmerman Time : 2024-05-14 19:58:23 +0000 Message : Merge pull request #275 from datacarpentry/update/packages Update 13 packages --- 00-introduction.md | 8 +- 01-r-basics.md | 90 +- 03-basics-factors-dataframes.md | 96 +- 05-dplyr.md | 56 +- 06-data-visualization.md | 8 +- 07-r-help.md | 2 +- config.yaml | 88 -- depth.pdf | Bin 45059 -> 45059 bytes ...dataframes-rendered-unnamed-chunk-10-1.png | Bin 362 -> 0 bytes ...dataframes-rendered-unnamed-chunk-14-1.png | Bin 3685 -> 0 bytes md5sum.txt | 36 +- renv.lock | 974 ------------------ 12 files changed, 148 insertions(+), 1210 deletions(-) delete mode 100644 config.yaml delete mode 100644 fig/03-basics-factors-dataframes-rendered-unnamed-chunk-10-1.png delete mode 100644 fig/03-basics-factors-dataframes-rendered-unnamed-chunk-14-1.png delete mode 100644 renv.lock diff --git a/00-introduction.md b/00-introduction.md index b90c9b860..de76a2c98 100644 --- a/00-introduction.md +++ b/00-introduction.md @@ -428,7 +428,7 @@ with a decimal: round(3.14) ``` -```{.output} +```output [1] 3 ``` @@ -455,7 +455,7 @@ You can also see a function's argument using the `args()` function: args(round) ``` -```{.output} +```output function (x, digits = 0) NULL ``` @@ -473,7 +473,7 @@ function: round(3.14159, digits = 2) ``` -```{.output} +```output [1] 3.14 ``` @@ -487,7 +487,7 @@ digits is 2. round(3.14159, 2) ``` -```{.output} +```output [1] 3.14 ``` diff --git a/01-r-basics.md b/01-r-basics.md index 45c17b2d0..9f02c60a6 100644 --- a/01-r-basics.md +++ b/01-r-basics.md @@ -338,7 +338,7 @@ their modes. Try to guess what the mode will be before you look at the solution mode(chromosome_name) ``` -```{.output} +```output [1] "character" ``` @@ -346,7 +346,7 @@ mode(chromosome_name) mode(od_600_value) ``` -```{.output} +```output [1] "numeric" ``` @@ -354,7 +354,7 @@ mode(od_600_value) mode(chr_position) ``` -```{.output} +```output [1] "character" ``` @@ -362,7 +362,7 @@ mode(chr_position) mode(spock) ``` -```{.output} +```output [1] "logical" ``` @@ -371,7 +371,7 @@ mode(spock) mode(pilot) ``` -```{.error} +```error Error in eval(expr, envir, enclos): object 'pilot' not found ``` @@ -399,7 +399,7 @@ to check their classes. class(chromosome_name) ``` -```{.output} +```output [1] "character" ``` @@ -407,7 +407,7 @@ class(chromosome_name) class(od_600_value) ``` -```{.output} +```output [1] "numeric" ``` @@ -415,7 +415,7 @@ class(od_600_value) class(chr_position) ``` -```{.output} +```output [1] "character" ``` @@ -423,7 +423,7 @@ class(chr_position) class(spock) ``` -```{.output} +```output [1] "logical" ``` @@ -432,7 +432,7 @@ class(spock) class(pilot) ``` -```{.error} +```error Error in eval(expr, envir, enclos): object 'pilot' not found ``` @@ -458,7 +458,7 @@ pilot <- "Earhart" mode(pilot) ``` -```{.output} +```output [1] "character" ``` @@ -468,7 +468,7 @@ pilot <- "Earhart" typeof(pilot) ``` -```{.output} +```output [1] "character" ``` @@ -496,7 +496,7 @@ These can be used with literal numbers: (1 + (5 ** 0.5))/2 ``` -```{.output} +```output [1] 1.618034 ``` @@ -512,7 +512,7 @@ by R) a numeric object: human_chr_number * 2 ``` -```{.output} +```output [1] 46 ``` @@ -534,7 +534,7 @@ functions. Hint: remember the `round()` function can take 2 arguments. round((1 + sqrt(5))/2, digits = 3) ``` -```{.output} +```output [1] 1.618 ``` @@ -574,7 +574,7 @@ Another useful function that gives both of these pieces of information is the mode(snp_genes) ``` -```{.output} +```output [1] "character" ``` @@ -582,7 +582,7 @@ mode(snp_genes) length(snp_genes) ``` -```{.output} +```output [1] 4 ``` @@ -590,7 +590,7 @@ length(snp_genes) str(snp_genes) ``` -```{.output} +```output chr [1:4] "OXTR" "ACTN3" "AR" "OPRM1" ``` @@ -624,7 +624,7 @@ we place the index (e.g. a number) in that bracket as follows: snps[3] ``` -```{.output} +```output [1] "rs6152" ``` @@ -639,7 +639,7 @@ range of numbers: snps[1:3] ``` -```{.output} +```output [1] "rs53576" "rs1815739" "rs6152" ``` @@ -654,7 +654,7 @@ positions you wish to retrieve. snps[c(1, 3, 4)] ``` -```{.output} +```output [1] "rs53576" "rs6152" "rs1799971" ``` @@ -670,7 +670,7 @@ Also, several of these subsetting expressions can be combined: snps[c(1:3,4)] ``` -```{.output} +```output [1] "rs53576" "rs1815739" "rs6152" "rs1799971" ``` @@ -693,7 +693,7 @@ We can verify that "snp\_genes" contains the new gene entry snp_genes ``` -```{.output} +```output [1] "OXTR" "ACTN3" "AR" "OPRM1" "CYP1A1" "APOA5" ``` @@ -705,7 +705,7 @@ value removed: snp_genes[-6] ``` -```{.output} +```output [1] "OXTR" "ACTN3" "AR" "OPRM1" "CYP1A1" ``` @@ -717,7 +717,7 @@ snp_genes <- snp_genes[-6] snp_genes ``` -```{.output} +```output [1] "OXTR" "ACTN3" "AR" "OPRM1" "CYP1A1" ``` @@ -729,7 +729,7 @@ snp_genes[6]<- "APOA5" snp_genes ``` -```{.output} +```output [1] "OXTR" "ACTN3" "AR" "OPRM1" "CYP1A1" "APOA5" ``` @@ -774,7 +774,7 @@ There is one last set of cool subsetting capabilities we want to introduce. It i snp_positions[snp_positions > 100000000] ``` -```{.output} +```output [1] 154039662 ``` @@ -805,7 +805,7 @@ evaluates to: snp_positions > 100000000 ``` -```{.output} +```output [1] FALSE FALSE FALSE TRUE ``` @@ -817,7 +817,7 @@ you pass a logical vector as an index, R will return the true values: snp_positions[c(FALSE, FALSE, FALSE, TRUE)] ``` -```{.output} +```output [1] 154039662 ``` @@ -840,7 +840,7 @@ evaluates as TRUE in our comparison: which(snp_positions > 100000000) ``` -```{.output} +```output [1] 4 ``` @@ -857,7 +857,7 @@ snp_marker_cutoff <- 100000000 snp_positions[snp_positions > snp_marker_cutoff] ``` -```{.output} +```output [1] 154039662 ``` @@ -883,7 +883,7 @@ value: is.na(snp_genes) ``` -```{.output} +```output [1] FALSE FALSE FALSE FALSE FALSE FALSE ``` @@ -903,7 +903,7 @@ the vector you are searching: c("ACTN3","APOA5") %in% snp_genes ``` -```{.output} +```output [1] TRUE TRUE ``` @@ -942,7 +942,7 @@ c. `snp_positions` mode(snps) ``` -```{.output} +```output [1] "character" ``` @@ -950,7 +950,7 @@ mode(snps) mode(snp_chromosomes) ``` -```{.output} +```output [1] "character" ``` @@ -958,7 +958,7 @@ mode(snp_chromosomes) mode(snp_positions) ``` -```{.output} +```output [1] "numeric" ``` @@ -985,7 +985,7 @@ snps <- c(snps, "rs662799") snps ``` -```{.output} +```output [1] "rs53576" "rs1815739" "rs6152" "rs1799971" "rs662799" ``` @@ -994,7 +994,7 @@ snp_chromosomes <- c(snp_chromosomes, "11") # did you use quotes? snp_chromosomes ``` -```{.output} +```output [1] "3" "11" "X" "6" "11" ``` @@ -1003,7 +1003,7 @@ snp_positions <- c(snp_positions, 116792991) snp_positions ``` -```{.output} +```output [1] 8762685 66560624 67545785 154039662 116792991 ``` @@ -1036,7 +1036,7 @@ snp_genes <- c(snp_genes, NA, NA) snp_genes ``` -```{.output} +```output [1] "OXTR" "ACTN3" "AR" "OPRM1" "APOA5" NA NA ``` @@ -1065,7 +1065,7 @@ combined <- c(snp_genes[1], snps[1], snp_chromosomes[1], snp_positions[1]) combined ``` -```{.output} +```output [1] "OXTR" "rs53576" "3" "8762685" ``` @@ -1088,7 +1088,7 @@ What type of data is `combined`? typeof(combined) ``` -```{.output} +```output [1] "character" ``` @@ -1125,7 +1125,7 @@ snp_data <- list(genes = snp_genes, str(snp_data) ``` -```{.output} +```output List of 4 $ genes : chr [1:7] "OXTR" "ACTN3" "AR" "OPRM1" ... $ refference_snp: chr [1:5] "rs53576" "rs1815739" "rs6152" "rs1799971" ... @@ -1142,7 +1142,7 @@ To get all the values for the `position` object in the list, we use the `$` nota snp_data$position ``` -```{.output} +```output [1] 8762685 66560624 67545785 154039662 116792991 ``` @@ -1155,7 +1155,7 @@ To get the first value in the `position` object, use the `[]` notation to index: snp_data$position[1] ``` -```{.output} +```output [1] 8762685 ``` ::::::::::::::::::::::::::::::::::::::::: diff --git a/03-basics-factors-dataframes.md b/03-basics-factors-dataframes.md index fde632e48..70b9c5681 100644 --- a/03-basics-factors-dataframes.md +++ b/03-basics-factors-dataframes.md @@ -198,7 +198,7 @@ frame. Let's examine what each of these functions can tell us: summary(variants) ``` -```{.output} +```output sample_id CHROM POS ID Length:801 Length:801 Min. : 1521 Mode:logical Class :character Class :character 1st Qu.:1115970 NA's:801 @@ -284,7 +284,7 @@ at how data frames work: str(subset) ``` -```{.output} +```output 'data.frame': 801 obs. of 4 variables: $ sample_id: chr "SRR2584863" "SRR2584863" "SRR2584863" "SRR2584863" ... $ CHROM : chr "CP000819.1" "CP000819.1" "CP000819.1" "CP000819.1" ... @@ -323,7 +323,7 @@ Ok, thats a lot up unpack! Some things to notice. mode(variants) ``` - ```{.output} + ```output [1] "list" ``` @@ -334,7 +334,7 @@ Ok, thats a lot up unpack! Some things to notice. class(variants) ``` - ```{.output} + ```output [1] "data.frame" ``` @@ -374,7 +374,7 @@ Let's look at the first few items in our factor using `head()`: head(alt_alleles) ``` -```{.output} +```output [1] "G" "T" "T" "CTTTTTTTT" "CCGCGC" "T" ``` @@ -401,19 +401,19 @@ now: plot(snps) ``` -```{.warning} +```warning Warning in xy.coords(x, y, xlabel, ylabel, log): NAs introduced by coercion ``` -```{.warning} +```warning Warning in min(x): no non-missing arguments to min; returning Inf ``` -```{.warning} +```warning Warning in max(x): no non-missing arguments to max; returning -Inf ``` -```{.error} +```error Error in plot.window(...): need finite 'ylim' values ``` @@ -434,7 +434,7 @@ Let's learn a little more about this new type of vector: str(factor_snps) ``` -```{.output} +```output Factor w/ 4 levels "A","C","G","T": 1 1 1 1 1 1 1 1 1 1 ... ``` @@ -458,7 +458,7 @@ We can see how many items in our vector fall into each category: summary(factor_snps) ``` -```{.output} +```output A C G T 211 139 154 203 ``` @@ -552,9 +552,9 @@ it will look for a CRAN repository to install from. So, for example, to install install.packages("ggplot2") ``` -```{.output} +```output The following package(s) will be installed: -- ggplot2 [3.5.0] +- ggplot2 [3.5.1] These packages will be installed into "~/work/genomics-r-intro/genomics-r-intro/renv/profiles/lesson-requirements/renv/library/R-4.3/x86_64-pc-linux-gnu". # Installing packages -------------------------------------------------------- @@ -614,7 +614,7 @@ a. variants[1, 1] ``` -```{.output} +```output [1] "SRR2584863" ``` @@ -625,7 +625,7 @@ b. variants[2, 4] ``` -```{.output} +```output [1] NA ``` @@ -636,7 +636,7 @@ c. variants[801, 29] ``` -```{.output} +```output [1] "T" ``` @@ -647,7 +647,7 @@ d. variants[2, ] ``` -```{.output} +```output sample_id CHROM POS ID REF ALT QUAL FILTER INDEL IDV IMF DP VDB 2 SRR2584863 CP000819.1 263235 NA G T 85 NA FALSE NA NA 6 0.096133 RPB MQB BQB MQSB SGB MQ0F ICB HOB AC AN DP4 MQ @@ -666,7 +666,7 @@ variants[-1, ] ``` -```{.output} +```output sample_id CHROM POS ID REF ALT QUAL FILTER INDEL IDV IMF 2 SRR2584863 CP000819.1 263235 NA G T 85 NA FALSE NA NA 3 SRR2584863 CP000819.1 281923 NA G T 217 NA FALSE NA NA @@ -704,7 +704,7 @@ f. variants[1:4, 1] ``` -```{.output} +```output [1] "SRR2584863" "SRR2584863" "SRR2584863" "SRR2584863" ``` @@ -715,7 +715,7 @@ g. variants[1:10, c("REF", "ALT")] ``` -```{.output} +```output REF 1 T 2 G @@ -748,7 +748,7 @@ variants[, c("sample_id")] ``` -```{.output} +```output [1] "SRR2584863" "SRR2584863" "SRR2584863" "SRR2584863" "SRR2584863" [6] "SRR2584863" ``` @@ -760,7 +760,7 @@ i. head(variants) ``` -```{.output} +```output sample_id CHROM POS ID REF ALT QUAL FILTER INDEL IDV IMF 1 SRR2584863 CP000819.1 9972 NA T G 91 NA FALSE NA NA 2 SRR2584863 CP000819.1 263235 NA G T 85 NA FALSE NA NA @@ -798,7 +798,7 @@ j. tail(variants) ``` -```{.output} +```output sample_id CHROM POS ID REF ALT QUAL FILTER INDEL IDV IMF DP 796 SRR2589044 CP000819.1 3444175 NA G T 184 NA FALSE NA NA 9 797 SRR2589044 CP000819.1 3481820 NA A G 225 NA FALSE NA NA 12 @@ -837,7 +837,7 @@ variants$sample_id ``` -```{.output} +```output [1] "SRR2584863" "SRR2584863" "SRR2584863" "SRR2584863" "SRR2584863" [6] "SRR2584863" ``` @@ -850,7 +850,7 @@ variants[variants$REF == "A", ] ``` -```{.output} +```output sample_id CHROM POS ID REF ALT QUAL FILTER INDEL IDV IMF DP 11 SRR2584863 CP000819.1 2407766 NA A C 104 NA FALSE NA NA 9 12 SRR2584863 CP000819.1 2446984 NA A C 225 NA FALSE NA NA 20 @@ -916,7 +916,7 @@ SRR2584863_variants <- variants[variants$sample_id == "SRR2584863", ] dim(SRR2584863_variants) ``` -```{.output} +```output [1] 25 29 ``` @@ -926,7 +926,7 @@ dim(SRR2584863_variants) summary(SRR2584863_variants) ``` -```{.output} +```output sample_id CHROM POS ID Length:25 Length:25 Min. : 9972 Mode:logical Class :character Class :character 1st Qu.:1331794 NA's:25 @@ -1017,7 +1017,7 @@ snp_chromosomes <- c('3', '11', 'X', '6') typeof(snp_chromosomes) ``` -```{.output} +```output [1] "character" ``` @@ -1031,7 +1031,7 @@ snp_chromosomes_2 <- c(3, 11, 'X', 6) typeof(snp_chromosomes_2) ``` -```{.output} +```output [1] "character" ``` @@ -1039,7 +1039,7 @@ typeof(snp_chromosomes_2) snp_chromosomes_2[1] ``` -```{.output} +```output [1] "3" ``` @@ -1053,7 +1053,7 @@ snp_positions_2 <- c("8762685", "66560624", "67545785", "154039662") typeof(snp_positions_2) ``` -```{.output} +```output [1] "character" ``` @@ -1061,7 +1061,7 @@ typeof(snp_positions_2) snp_positions_2[1] ``` -```{.output} +```output [1] "8762685" ``` @@ -1073,7 +1073,7 @@ snp_positions_2 <- as.numeric(snp_positions_2) typeof(snp_positions_2) ``` -```{.output} +```output [1] "double" ``` @@ -1081,7 +1081,7 @@ typeof(snp_positions_2) snp_positions_2[1] ``` -```{.output} +```output [1] 8762685 ``` @@ -1093,7 +1093,7 @@ using `as.numeric()` on `snp_chromosomes_2` snp_chromosomes_2 <- as.numeric(snp_chromosomes_2) ``` -```{.warning} +```warning Warning: NAs introduced by coercion ``` @@ -1105,7 +1105,7 @@ data) has been introduced. snp_chromosomes_2 ``` -```{.output} +```output [1] 3 11 NA 6 ``` @@ -1118,7 +1118,7 @@ look at the result: as.numeric(factor_snps) ``` -```{.output} +```output [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [38] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [75] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 @@ -1160,7 +1160,7 @@ variants$REF <- as.character(variants$REF) typeof(variants$REF) ``` -```{.output} +```output [1] "character" ``` @@ -1213,7 +1213,7 @@ reads that support each of the reported variants. max(variants$DP) ``` -```{.output} +```output [1] 79 ``` @@ -1225,7 +1225,7 @@ sorted_by_DP <- variants[order(variants$DP), ] head(sorted_by_DP$DP) ``` -```{.output} +```output [1] 2 2 2 2 2 2 ``` @@ -1247,7 +1247,7 @@ variants with the greatest filtered depth ("DP"). head(sorted_by_DP$DP) ``` -```{.output} +```output [1] 79 46 41 29 29 27 ``` @@ -1265,7 +1265,7 @@ colnames(variants)[colnames(variants) == "sample_id"] <- "strain" colnames(variants) ``` -```{.output} +```output [1] "strain" "CHROM" "POS" "ID" [5] "REF" "ALT" "QUAL" "FILTER" [9] "INDEL" "IDV" "IMF" "DP" @@ -1339,7 +1339,7 @@ frame: head(Ecoli_metadata) ``` -```{.output} +```output # A tibble: 6 × 7 sample generation clade strain cit run genome_size @@ -1386,7 +1386,7 @@ H) Save the edited Ecoli\_metadata data frame as "exercise\_solution.csv" in you dim(Ecoli_metadata) ``` -```{.output} +```output [1] 30 7 ``` @@ -1394,7 +1394,7 @@ dim(Ecoli_metadata) levels(as.factor(Ecoli_metadata$cit)) ``` -```{.output} +```output [1] "minus" "plus" "unknown" ``` @@ -1402,7 +1402,7 @@ levels(as.factor(Ecoli_metadata$cit)) table(as.factor(Ecoli_metadata$cit)) ``` -```{.output} +```output minus plus unknown 9 9 12 @@ -1412,7 +1412,7 @@ table(as.factor(Ecoli_metadata$cit)) Ecoli_metadata[7, 7] ``` -```{.output} +```output # A tibble: 1 × 1 genome_size @@ -1423,7 +1423,7 @@ Ecoli_metadata[7, 7] median(Ecoli_metadata$genome_size) ``` -```{.output} +```output [1] 4.625 ``` diff --git a/05-dplyr.md b/05-dplyr.md index 571c6982a..2a04388bb 100644 --- a/05-dplyr.md +++ b/05-dplyr.md @@ -114,7 +114,7 @@ Now let's load our vcf .csv file using `read_csv()`: Similar to `str()`, which comes built into R, `glimpse()` is a `dplyr` function that (as the name suggests) gives a glimpse of the data frame. -```{.output} +```output Rows: 801 Columns: 29 $ sample_id "SRR2584863", "SRR2584863", "SRR2584863", "SRR2584863", … @@ -159,7 +159,7 @@ To select columns of a data frame, use `select()`. The first argument to this fu select(variants, sample_id, REF, ALT, DP) ``` -```{.output} +```output # A tibble: 801 × 4 sample_id REF ALT DP @@ -184,7 +184,7 @@ the variable to exclude it. select(variants, -CHROM) ``` -```{.output} +```output # A tibble: 801 × 28 sample_id POS ID REF ALT QUAL FILTER INDEL IDV IMF DP @@ -211,7 +211,7 @@ select(variants, -CHROM) select(variants, ends_with("B")) ``` -```{.output} +```output # A tibble: 801 × 8 VDB RPB MQB BQB MQSB SGB ICB HOB @@ -249,7 +249,7 @@ variants_result <- select(variants_subset, -Indiv, -FILTER) variants_result ``` -```{.output} +```output # A tibble: 801 × 7 POS sample_id ID INDEL IDV IMF ICB @@ -280,7 +280,7 @@ variants_result <- select(variants, POS, contains("i"), -Indiv, -FILTER) variants_result ``` -```{.output} +```output # A tibble: 801 × 7 POS sample_id ID INDEL IDV IMF ICB @@ -308,7 +308,7 @@ To choose rows, use `filter()`: filter(variants, sample_id == "SRR2584863") ``` -```{.output} +```output # A tibble: 25 × 29 sample_id CHROM POS ID REF ALT QUAL FILTER INDEL IDV IMF @@ -338,7 +338,7 @@ Here are a few examples: filter(variants, REF %in% c("T", "G")) ``` -```{.output} +```output # A tibble: 340 × 29 sample_id CHROM POS ID REF ALT QUAL FILTER INDEL IDV IMF DP @@ -363,7 +363,7 @@ filter(variants, REF %in% c("T", "G")) filter(variants, INDEL) ``` -```{.output} +```output # A tibble: 101 × 29 sample_id CHROM POS ID REF ALT QUAL FILTER INDEL IDV IMF DP @@ -388,7 +388,7 @@ filter(variants, INDEL) filter(variants, !is.na(IDV)) ``` -```{.output} +```output # A tibble: 101 × 29 sample_id CHROM POS ID REF ALT QUAL FILTER INDEL IDV IMF DP @@ -420,7 +420,7 @@ have a QUAL score above a certain threshold: filter(variants, QUAL >= 100) ``` -```{.output} +```output # A tibble: 666 × 29 sample_id CHROM POS ID REF ALT QUAL FILTER INDEL IDV IMF DP @@ -449,7 +449,7 @@ filter(variants, QUAL >= 100) filter(variants, sample_id == "SRR2584863", QUAL >= 100) ``` -```{.output} +```output # A tibble: 19 × 29 sample_id CHROM POS ID REF ALT QUAL FILTER INDEL IDV IMF DP @@ -482,7 +482,7 @@ filter(variants, sample_id == "SRR2584863", QUAL >= 100) filter(variants, sample_id == "SRR2584863", (MQ >= 50 | QUAL >= 100)) ``` -```{.output} +```output # A tibble: 23 × 29 sample_id CHROM POS ID REF ALT QUAL FILTER INDEL IDV IMF @@ -521,7 +521,7 @@ Hint: to flip logical values such as TRUE to a FALSE, we can use to negation sym filter(variants, POS >= 1e6 & POS <= 2e6, QUAL > 200, !INDEL) ``` -```{.output} +```output # A tibble: 77 × 29 sample_id CHROM POS ID REF ALT QUAL FILTER INDEL IDV IMF DP @@ -564,7 +564,7 @@ variants %>% select(REF, ALT, DP) ``` -```{.output} +```output # A tibble: 25 × 3 REF ALT DP @@ -613,7 +613,7 @@ the first six rows to confirm it's what we want: SRR2584863_variants ``` -```{.output} +```output # A tibble: 25 × 3 REF ALT DP @@ -637,7 +637,7 @@ Similar to `head()` and `tail()` functions, we can also look at the first or las SRR2584863_variants %>% slice(1:6) ``` -```{.output} +```output # A tibble: 6 × 3 REF ALT DP @@ -654,7 +654,7 @@ SRR2584863_variants %>% slice(1:6) SRR2584863_variants %>% slice(10:25) ``` -```{.output} +```output # A tibble: 16 × 3 REF ALT DP @@ -697,7 +697,7 @@ Showing only 5th through 11th rows of columns `REF`, `ALT`, and `POS`. select(sample_id, DP, REF, ALT, POS) ``` -```{.output} +```output # A tibble: 7 × 5 sample_id DP REF ALT POS @@ -734,7 +734,7 @@ variants %>% mutate(POLPROB = 1 - (10 ^ -(QUAL/10))) ``` -```{.output} +```output # A tibble: 801 × 30 sample_id CHROM POS ID REF ALT QUAL FILTER INDEL IDV IMF @@ -774,7 +774,7 @@ variants %>% select(sample_id, POS, QUAL, POLPROB) ``` -```{.output} +```output # A tibble: 801 × 4 sample_id POS QUAL POLPROB @@ -812,7 +812,7 @@ variants %>% tally() ``` -```{.output} +```output # A tibble: 3 × 2 sample_id n @@ -829,7 +829,7 @@ variants %>% count(sample_id) ``` -```{.output} +```output # A tibble: 3 × 2 sample_id n @@ -854,7 +854,7 @@ variants %>% count(INDEL) ``` -```{.output} +```output # A tibble: 2 × 2 INDEL n @@ -901,7 +901,7 @@ variants %>% max_DP = max(DP)) ``` -```{.output} +```output # A tibble: 3 × 5 sample_id mean_DP median_DP min_DP max_DP @@ -935,7 +935,7 @@ variants_wide <- variants %>% pivot_wider(names_from = sample_id, values_from = mean_DP) ``` -```{.output} +```output `summarise()` has grouped output by 'sample_id'. You can override using the `.groups` argument. ``` @@ -944,7 +944,7 @@ variants_wide <- variants %>% variants_wide ``` -```{.output} +```output # A tibble: 1 × 4 CHROM SRR2584863 SRR2584866 SRR2589044 @@ -959,7 +959,7 @@ variants_wide %>% pivot_longer(-CHROM, names_to = "sample_id", values_to = "mean_DP") ``` -```{.output} +```output # A tibble: 3 × 3 CHROM sample_id mean_DP diff --git a/06-data-visualization.md b/06-data-visualization.md index 54987fd62..759c11333 100644 --- a/06-data-visualization.md +++ b/06-data-visualization.md @@ -70,18 +70,18 @@ library(readr) library(dplyr) ``` -```{.output} +```output Attaching package: 'dplyr' ``` -```{.output} +```output The following objects are masked from 'package:stats': filter, lag ``` -```{.output} +```output The following objects are masked from 'package:base': intersect, setdiff, setequal, union @@ -103,7 +103,7 @@ Explore the *structure* (types of columns and number of rows) of the dataset usi glimpse(variants) # Show a snapshot of the rows and columns ``` -```{.output} +```output Rows: 801 Columns: 29 $ sample_id "SRR2584863", "SRR2584863", "SRR2584863", "SRR2584863", … diff --git a/07-r-help.md b/07-r-help.md index db8c66fb1..7e4b469d0 100644 --- a/07-r-help.md +++ b/07-r-help.md @@ -155,7 +155,7 @@ they come up commonly: 1:101 # generates the sequence of numbers from 1 to 101 ``` -```{.output} +```output [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [19] 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 [37] 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 diff --git a/config.yaml b/config.yaml deleted file mode 100644 index d35bbb686..000000000 --- a/config.yaml +++ /dev/null @@ -1,88 +0,0 @@ -#------------------------------------------------------------ -# Values for this lesson. -#------------------------------------------------------------ - -# Which carpentry is this (swc, dc, lc, or cp)? -# swc: Software Carpentry -# dc: Data Carpentry -# lc: Library Carpentry -# cp: Carpentries (to use for instructor training for instance) -# incubator: The Carpentries Incubator -carpentry: 'dc' - -# Overall title for pages. -title: 'Intro to R and RStudio for Genomics' - -# Date the lesson was created (YYYY-MM-DD, this is empty by default) -created: '2018-03-12' - -# Comma-separated list of keywords for the lesson -keywords: 'software, data, lesson, The Carpentries' - -# Life cycle stage of the lesson -# possible values: pre-alpha, alpha, beta, stable -life_cycle: 'beta' - -# License of the lesson materials (recommended CC-BY 4.0) -license: 'CC-BY 4.0' - -# Link to the source repository for this lesson -source: 'https://github.com/datacarpentry/genomics-r-intro' - -# Default branch of your lesson -branch: 'main' - -# Who to contact if there are any issues -contact: 'team@carpentries.org' - -# Navigation ------------------------------------------------ -# -# Use the following menu items to specify the order of -# individual pages in each dropdown section. Leave blank to -# include all pages in the folder. -# -# Example ------------- -# -# episodes: -# - introduction.md -# - first-steps.md -# -# learners: -# - setup.md -# -# instructors: -# - instructor-notes.md -# -# profiles: -# - one-learner.md -# - another-learner.md - -# Order of episodes in your lesson -episodes: -- 00-introduction.Rmd -- 01-r-basics.Rmd -- 02-data-prelude.Rmd -- 03-basics-factors-dataframes.Rmd -- 04-bioconductor-vcfr.Rmd -- 05-dplyr.Rmd -- 06-data-visualization.Rmd -- 07-r-help.Rmd - -# Information for Learners -learners: - -# Information for Instructors -instructors: - -# Learner Profiles -profiles: - -# Customisation --------------------------------------------- -# -# This space below is where custom yaml items (e.g. pinning -# sandpaper and varnish versions) should live - - -url: 'https://datacarpentry.github.io/genomics-r-intro' -analytics: carpentries -lang: en diff --git a/depth.pdf b/depth.pdf index cd6caaef885e2b834c4e2c0e52fb706f6a0f5509..ec76f9ff524f2e6378255404254b7e69f1360c2c 100644 GIT binary patch delta 50 ycmZpEz|{PJX@Z%msiBFXrKzQ delta 50 ycmZpEz|{PJX@Z%miGhiMfsvuHi6)o6Z+?nPVo9okhKrSvfe}asDz`Cu#d-j90}fjN diff --git a/fig/03-basics-factors-dataframes-rendered-unnamed-chunk-10-1.png b/fig/03-basics-factors-dataframes-rendered-unnamed-chunk-10-1.png deleted file mode 100644 index a9cacb2958ddea79687b8f875abdc650da01fad4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 362 zcmeAS@N?(olHy`uVBq!ia0y~yVEh5X9LzwGiQo8rffRFqPl)UP|NoaCkv;+Bau#?* z7Bet#3xP1>rMq>1fEsu`T^vIy=Da;<$Ou$&Xu((iTpsxaK;{Sp5Aq+SGB7F%Uls&; N-qY33Wt~$(695WHAk_c> diff --git a/fig/03-basics-factors-dataframes-rendered-unnamed-chunk-14-1.png b/fig/03-basics-factors-dataframes-rendered-unnamed-chunk-14-1.png deleted file mode 100644 index 99e25c6db9a787bf1bd497e5ac6b7e6d5b251ea4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3685 zcmdT`X;71C5>AYOf)JI#2pR%|2O}al=)`aYITSD`h+tHlppF>iR<49#5*JZCfCWoY zFtDKD0-A`3OfZ+AC@6;r2EiN*M>xcM+#%$cL}s?OYJcqhn60V#@pir4-}gS%)z8yi zec6AXm!ZCyJ_rOd^zrr#0D-_V?O6iRM6zd~dqJQ@NPpkJT^bh*216ha9UUEAU0ppr zJ$-$B0|Ns?Lqj7YBPbNQV#Nw$W8-hW`NqV=1O|hxUcK7X)YQz(Y|WZAYuB!Y!{O%U z<_HAB!otGR((>DHzqPWm+OT26#*G`Tt*vcrY;0|9w`|#BZ*TA5;DAITckI}KLZKWT z9i5zd-rZHFE4LzZyz5Y3$`XF zUOzuSe}Dh|`}ZF>a3Cls=-|PFSSD7ej*gCvjXiVb%-OSNgGyOxoWk(rs9m6es9ot=}DbN%}D8#iv;ym>P> zH~04K+j)6;1qB5~MMcHM#rN*rD=8@{EiJu&|9)9nS$TPRMMcGf2M-=Td`PF$84Sjw zM~^BiE32xis;jG?K7CqKQ^RC3YinztJ$uGtvDj=jhr{7=xjY`PuCDIIix&+I4X<9k zdj0x!V`F1eQ&USzOKWRuTU%Rud;9zM?>jm=Iy*c0e12C~*T;_^ySux4dU`&6`Xmqt zL?TgdZ*N~;Uw?o9z`(%Z;Gjez85$ZI9v&VU85tcN{rvg!*x1;YFJGimDF6WD;Q2^$me>2H6)HCO4cnFnGx^U9Hv@Oiv6X$*Szu{dHvn_WKXNm7RTMj5)B-3d zHxvoCZzICH-tAv-xhIRyu8E*0EGPJNUJOZieAcF>({Txlt&&Pa4(-Mr7hQ#{<9s1) z6fuS3Q+SFoJOS6x;m`Jm+fC8P2 zxO&MZ8Zk=lCLSYF8DttMnN%`EAJza#z~lx#vtC3~IRG=xyjGc`UW$@PEgVlUlF8%1 z6!x289r0)@L@^Alj;^&Q#_Wj!g;31JB6W!?;?O&23Y|#hPK$ibo)}m!o_q^YG`afX z$n7)V1E@i;3Ra^`8R@RIXM?q%ekw9~MBZIAi5BB2`(ug6*r7%f6OiPNY_%YlzzyTzjQ!|woqrwEtq_SSCGE;ML7BZ%*I!PiAK(WCrR4&li)~gh_cwMUaa2_c! zCYMj9c1G~>T4xve^TAFZ?E_Jjw427&sB5XK@Lezy5<=P18xxPx{>=x1 zz%fRIts2@3LwWoqggD++4fl%85YBF1J_NUnP((E3K6IJ=q7Dkz1-9oI$P(sSyJl$} z%fu0jSt#*Kjec+jgze&Hu$`_(Lq~WOzXS3Y;S7JnW32+h7vL<#)l@7*xE45}(G)|6 zWd;mVVOmMriaV)DJ=SWCEF-`S-9HO@;u2zPbPU13=?d>)WLIf>ZQo$7KE?UOfMQzK zr;zw<{RzjsycU?u^$m>vsd<5vg$YukrF5l=FnRGuQWD+n#``r|1r#p(ZD54M332FN zA}v2*i`Jg|-ByH1GM`|>dt8(jfWzR*0zUJjKca{B5_S^f8f*o-CnpayNYY;{L!mlu-u!!|^wi7?Msa?|E z<6K`OFRGt^M#?mTsW(qiB3DVr`%(Y%BKCwyOwuOv>-bz}) ziUJQ;rEjIN?i%$D;<-MOdQ)rz&q?)tf)iGpzGqU8{EG`#O_YQcS!D`>hF)Ri&4QP$ zx58CC*J=NpNOZtZIzkYvjgRZ)^oL_GZ=m`G4iqs`_?R$mTWB5sqDs1Hs*llp2tB9# z(q7Um+C*q!ou{z3-CWmatG14Bc*v!(GMxkZ`Eq_tMT&>Oh*i1KJg+udm00A#k++0E zXI