Skip to content

Commit 22ccf7a

Browse files
authored
Merge pull request #91 from SPAAM-community/remove-eval
Remove leftover unnecssary eval:falses, update guidelines, rename som…
2 parents b46695f + 2a524fa commit 22ccf7a

8 files changed

+59
-78
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ If adding a new section chapter:
5555
7. Render the book the extensions' `Quarto: Render Book` command, or run the following
5656

5757
```bash
58-
#| eval: false
5958
quarto preview intro-to-ancient-metagenomics-book --render all --no-browser --no-watch-inputs
6059
```
6160

ancient-metagenomic-pipelines.qmd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,6 @@ cd /<path/<to>/ancient-metagenomic-pipelines/aMeta/
733733
Finally, we are ready to run aMeta, where it will automatically pick up our config and samplesheet file we placed in `config/`!
734734
735735
```bash
736-
#| eval: false
737736
## change conda-frontend to mamba if we set this up earlier!
738737
snakemake --snakefile workflow/Snakefile --use-conda -j 10 --conda-frontend conda
739738
```
@@ -879,7 +878,7 @@ Firstly we need a method of validating that contigs are from an ancient genome (
879878
880879
Secondly, to correct for falsely included damage bases in contigs in some contexts. As previously stated a previous chapter by Alex Hübner:
881880
882-
> In our group we realised that the gene sequences that were annotated on the contigs of MEGAHIT tended to have a higher number of nonsense mutations compared to the known variants of the genes. After manual inspection, we observed that many of these mutations appeared because MEGAHIT chose the damage-derived T allele over the C allele or the damage-derived A allele over a G allele [see @Klapper2023-mv, Figure S1].
881+
> In our group we realised that the gene sequences that were annotated on the contigs of MEGAHIT tended to have a higher number of nonsense mutations compared to the known variants of the genes. After manual inspection, we observed that many of these mutations appeared because MEGAHIT chose the damage-derived T allele over the C allele or the damage-derived A allele over a G allele [see @Klapper2023-nv, Figure S1].
883882
884883
> To overcome this issue, my colleagues Maxime Borry, James Fellows Yates and I developed a strategy to replace these damage-derived alleles in the contig sequences. This approach consists of aligning the short-read data against the contigs, performing genotyping along them, and finally replacing all alleles for which we have strong support for an allele that is different from the one selected by MEGAHIT.
885884

chapter-checklist.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ This will help make the editing process more manageable by only considering one
7777
- Inline code defined with single `backticks` should be used for a single word or object (e.g., `variable`, `tool`, `.suffix`)
7878
- All commands or longer code related text must go in a dedicated markdown triple backticks with the language specified (e.g., ````bash`)
7979
- Do not prefix commands with a `$` or `>` to indicate a command prompt
80-
- Most code blocks with output should be set to `eval=FALSE` in the code block options, unless the code/plot is expected to executed on the fly
80+
- Code blocks that automatically execute in Quarto (e.g. R), output should be set to `eval=FALSE` in the code block options, unless the code/plot is expected to executed on the fly
8181
- Output from large/long-running output should be placed in a collapsible call-out block ([writing guidelines](chapter-writing-guidelines.qmd) for examples)
8282
- Code for self-guided chapter set-up should be wrapped in a collapsible note call-out block with a 'Self guided: \<title\>' format
8383
- Example code that should not be run by the user should wrapped in a 'warning' call-out block with the title 'Example command - do not run!'

chapter-template.qmd

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,47 @@ echo "Hello world!"
3434

3535
The code block above has `bash` as the code identifier. Inline text should only be used for single commands, file extensions, or paths, i.e., not whole commands.
3636

37-
Large or long running code should be set to `eval` false, and pre-made output placed in a collapsible block.
37+
For code blocks that execute - by default only R - should be set to `eval=FALSE`.
38+
Pre-made output should be copy pasted and placed in a collapsible block.
39+
For example the following.
3840

39-
```{.bash, eval = false}
40-
echo "SPAAM rules!"
41+
```{.r eval=FALSE}
42+
print('SPAAM Rules!')
4143
```
44+
4245
::: {.callout-note collapse="true"}
4346
## Expand see output
4447

45-
```{.default, eval = false}
46-
SPAAM rules!
48+
```{.r eval=FALSE}
49+
[1] "SPAAM Rules!"
4750
```
4851
:::
4952

53+
Can be written as.
54+
55+
`````verbatim
56+
```{.r eval=FALSE}
57+
print('SPAAM Rules!')
58+
```
59+
`````
60+
61+
::: {.callout-note collapse="true"}
62+
## Expand see output
63+
`````verbatim
64+
```{.r eval=FALSE}
65+
[1] "SPAAM Rules!"
66+
```
67+
`````
68+
:::
69+
70+
Other code blocks will not execute by default, and can be simply set without setting no execution.
71+
72+
`````verbatim
73+
```bash
74+
echo "SPAAM Rules!"
75+
```
76+
`````
77+
5078
## Second section
5179

5280
Here is an example of a figure. It must have a caption, and a label for referencing in text.

chapter-writing-guidelines.qmd

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,13 @@ See the [Chapter Content](#chapter-content) for the reserved formatting. Note: I
104104
Single backticks for inline code should only be used for single words such as tool names, e.g. `samtools`, file extensions such as `.txt`, or single paths `<path>/<to>/<here>`.
105105

106106
Any form of commands or code should be formatted as code in a syntax-named _triple_ backtick block.
107-
Execution should be turned off by default (with `eval: false` in a code block header block), unless has a very low computational overhead and can be rendered on the fly.
107+
Execution should be turned off by default for those languages that may auto-execute (i..e, R, with `eval=FALSE` in a code block header block), unless has a very low computational overhead and can be rendered on the fly.
108108
Language should be specified.
109109

110110
For example, this is a bash code block that has a whole command.
111111

112-
```{verbatim}
112+
```verbatim
113113
```bash
114-
#| eval: false
115114
echo "SPAAM rules!"
116115
```
117116
```
@@ -123,7 +122,7 @@ echo "SPAAM rules!"
123122
```
124123

125124
If you wish to display _large_ output from a code block that _does_ get executed, you should turn off the command execution printing in the code block itself, and use a collapsible callout block with a 'Expand to see output' title immediately after the code block itself that contains.
126-
The content of the output should also be in a triple backtick block, with the the `default` syntax specified.
125+
The content of the output should also be in a triple backtick block, with the the `verbatim` syntax specified.
127126

128127
```bash
129128
echo "SPAAM rules!"
@@ -138,18 +137,22 @@ SPAAM rules!
138137

139138
This was generated with
140139

141-
```markdown
142-
```bash
143-
echo "SPAAM rules!"
144-
```
145-
::: {.callout-note collapse="true"}
146-
## Expand see output
140+
Another example, with setting `eval=FALSE` for R.
147141

148-
```{.default, eval = false}
149-
SPAAM rules!
150-
```
151-
:::
142+
`````verbatim
143+
```{.r eval=FALSE}
144+
print('SPAAM Rules!')
152145
```
146+
`````
147+
148+
::: {.callout-note collapse="true"}
149+
## Expand see output
150+
`````verbatim
151+
```{.r eval=FALSE}
152+
[1] "SPAAM Rules!"
153+
```
154+
`````
155+
:::
153156

154157
Additional guidance is as follows:
155158

denovo-assembly.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Introduction to _de novo_ Genome Assembly
2+
title: _De novo_ Genome Assembly
33
author: Alexander Hübner
44
bibliography: assets/references/denovo-assembly.bib
55
---

python-pandas.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,15 +235,15 @@ For a more in detail pandas getting started tutorial click here ([https://pandas
235235
Pandas can read in _csv_ (comma separated values) files, which are tables in text format.
236236
It is called _c_sv because each value is separated from the others through a comma.
237237

238-
```{text}
238+
```verbatim
239239
A,B
240240
5,6
241241
8,4
242242
```
243243

244244
Another common tabular separator are _tsv_, where each value is separated by a _tab_ `\t`.
245245

246-
```{text}
246+
```verbatim
247247
A\tB
248248
5\t6
249249
8\t4

0 commit comments

Comments
 (0)