Skip to content

Commit

Permalink
fix vignette rendering issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nsheff committed Nov 17, 2023
1 parent 6da45e1 commit 5cac038
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vignettes/feature1_constantAttributes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ knitr::kable(sampleAnnotationDF, format = "html")
```

----

## Solution
As the name suggests the attributes in the specified attributes (here: `read_type`) can be defined as constant ones. The way how this process is carried out is indicated explicitly in the `project_config.yaml` file (presented below). The name of the column is determined in the `sample_modifiers.append` key-value pair. Note that definition of more than one constant attribute is possible.

Expand Down Expand Up @@ -72,7 +73,9 @@ sampleAnnotation = system.file(
```

----

## Code

Read in the project metadata by specifying the path to the `project_config.yaml`:

```{r}
Expand Down
4 changes: 4 additions & 0 deletions vignettes/feature2_impliedAttributes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ knitr::kable(sampleAnnotationDF, format = "html")
```

----

## Solution

Noticeably, the samples with attributes `human` and `mouse` (in the `organism` column) follow two distinct patterns here. They have additional attributes in attributes `genome` and `genome_size` in the `sample_table.csv` file. Consequently you can use implied attributes to add those attributes to the sample annotations (set global, species-level attributes at the project level instead of duplicating that information for every sample that belongs to a species). The way how this process is carried out is indicated explicitly in the `project_config.yaml` file (presented below).

```{r, echo=FALSE,message=FALSE,collapse=TRUE,comment=" "}
Expand Down Expand Up @@ -74,7 +76,9 @@ sampleAnnotation = system.file(
```

----

## Code

Rread in the project metadata by specifying the path to the `project_config.yaml`:

```{r}
Expand Down
5 changes: 5 additions & 0 deletions vignettes/feature3_derivedAttributes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ This vignette will show you how and why to use the derived attributes functional
- broader theoretical description in the derived attributes [documentation section](http://pep.databio.org/en/2.0.0/specification/#sample_modifiersderive).

## Problem/Goal

The example below demonstrates how to use the derived attributes to **flexibly define the samples attributes the `file_path` column** of the `sample_table.csv` file to match the file names in your project. Please consider the example below for reference:


Expand All @@ -45,7 +46,9 @@ knitr::kable(sampleAnnotationDF, format = "html")
```

----

## Solution

As the name suggests the attributes in the specified attributes (here: `file_path`) can be derived from other ones. The way how this process is carried out is indicated explicitly in the `project_config.yaml` file (presented below). The name of the column is determined in the `sample_modifiers.derive.attributes` key-value pair, whereas the pattern for the attributes construction - in the `sample_modifiers.derive.sources` one. Note that the second level key (here: `source`) has to exactly match the attributes in the `file_path` column of the modified `sample_annotation.csv` (presented below).


Expand Down Expand Up @@ -78,7 +81,9 @@ kable(sampleAnnotationDF, format = "html")
```

----

## Code

Load `pepr` and read in the project metadata by specifying the path to the `project_config.yaml`:

```{r}
Expand Down
3 changes: 3 additions & 0 deletions vignettes/feature4_derivedImpliedAttributes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ sampleAnnotationDF = read.table(sampleAnnotation, sep = ",", header = T)
knitr::kable(sampleAnnotationDF, format = "html")
```
----

## Solution

The specification of detailed file paths/names (as presented above) is cumbersome. In order to make your life easier just find the patterns that the file names in `file_path` column of `sample_table.csv` follow, imply needed attributes and derive the file names. This multi step process is orchestrated by the `project_config.yaml` file via the `sample_modifiers.derive` and `sample_modifiers.imply` sections:
Expand Down Expand Up @@ -67,7 +68,9 @@ sampleAnnotation = system.file(
```

----

## Code

Load `pepr` and read in the project metadata by specifying the path to the `project_config.yaml`:

```{r collapse=TRUE}
Expand Down
1 change: 1 addition & 0 deletions vignettes/feature5_sampleSubtable.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ This vignette will show you how and why to use the subsample table functionality

This series of examples below demonstrates how and why to use sample subannoatation functionality in multiple cases to **provide multiple input files of the same type for a single sample**.


## Solutions

### Example 1: basic sample subannotation table
Expand Down

0 comments on commit 5cac038

Please sign in to comment.