Skip to content

Commit 1a417ed

Browse files
authored
Merge pull request #61 from SPAAM-community/post-session-cleanup
Post session cleanup
2 parents 9741ddf + bed1373 commit 1a417ed

18 files changed

+170
-179
lines changed

_quarto.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ book:
1212
cover-image: "assets/images/cover.png"
1313
page-footer: "© 2023 SPAAM Community & Authors with ❤️. Available under [CC-BY 4.0](http://creativecommons.org/licenses/by-sa/4.0/). Source material [here](https://github.com/SPAAM-community/intro-to-ancient-metagenomics-book)."
1414
page-navigation: true
15-
downloads: [pdf, epub]
15+
#downloads: [pdf, epub]
1616
site-url: https://spaam-community.github.org/intro-to-ancient-metagenomics-book
1717
favicon: favicon.png
1818
open-graph: true
@@ -50,7 +50,6 @@ book:
5050
chapters:
5151
- accessing-ancientmetagenomic-data.qmd
5252
- ancient-metagenomic-pipelines.qmd
53-
- summary.qmd
5453
- part: appendices.qmd
5554
chapters:
5655
- resources.qmd

accessing-ancientmetagenomic-data.qmd

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,24 @@ bibliography: assets/references/chapters/accessing-ancientmetagenomic-data/refer
88
---
99

1010
::: {.callout-tip}
11-
For this chapter's exercises, if not already performed, you will need to create the [conda environment](before-you-start.qmd#creating-a-conda-environment) from the `yml` file in the following [link](https://github.com/SPAAM-community/intro-to-ancient-metagenomics-book/raw/main/assets/envs/accessing-ancientmetagenomic-data.yml) (right click and save as to download), and once created, activate the environment with:
11+
For this chapter's exercises, if not already performed, you will need to download the chapter's dataset, decompress the archive, and create and activate the conda environment.
12+
13+
Do this, use `wget` or right click and save to download this Zenodo archive: [10.5281/zenodo.8413229](https://doi.org/10.5281/zenodo.8413229), and unpack
1214

1315
```bash
14-
conda activate accessing-ancientmetagenomic-data
16+
tar xvf accessing-ancientmetagenomic-data.tar.gz
17+
cd accessing-ancientmetagenomic-data/
1518
```
1619

17-
To download the data for this chapter, please download following archive with, extract the tar, and change into the directory.
18-
19-
For example
20+
You can then create the subsequently activate environment with
2021

2122
```bash
22-
wget -O accessing-metagenomic-data.tar.gz https://www.dropbox.com/scl/fi/6yc24aqmjklppw59b03kp/accessing-ancientmetagenomic-data.tar.gz?rlkey=rly8e3xv28p5v0c2aixicdf21&dl=0 -P /<PATH>/<TO>/<SOMEWHERE_TO_STORE>/
23-
tar -xzf accessing-metagenomic-data.tar.gz
24-
cd accessing-metagenomic-data
23+
conda env create -f accessing-ancientmetagenomic-data.yml
24+
conda activate accessing-ancientmetagenomic-data
2525
```
2626
:::
2727

28+
2829
## Introduction
2930

3031
In most bioinformatic projects, we need to include publicly available comparative data to expand or compare our newly generated data with.

ancient-metagenomic-pipelines.qmd

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ csl: american-journal-of-physical-anthropology.csl
66
---
77

88
::: {.callout-tip}
9-
For this chapter's exercises, if not already performed, you will need to create the [conda environment](before-you-start.qmd#creating-a-conda-environment) from the `yml` file in the following [link](https://github.com/SPAAM-community/intro-to-ancient-metagenomics-book/raw/main/assets/envs/ancient-metagenomic-pipelines.yml) (right click and save as to download), and once created, activate the environment with:
9+
For this chapter's exercises, if not already performed, you will need to download the chapter's dataset, decompress the archive, and create and activate the conda environment.
10+
11+
Do this, use `wget` or right click and save to download this Zenodo archive: [10.5281/zenodo.8413239](https://doi.org/10.5281/zenodo.8413239), and unpack
1012

1113
```bash
12-
conda activate ancient-metagenomic-pipelines
14+
tar xvf ancient-metagenomic-pipelines.tar.gz
15+
cd ancient-metagenomic-pipelines/
1316
```
1417

15-
To download the data for this chapter, please download following archive with, extract the tar, and change into the directory.
16-
17-
For example
18+
You can then create the subsequently activate environment with
1819

1920
```bash
20-
wget -O ancient-metagenomic-pipelines.tar.gz https://www.dropbox.com/scl/fi/oxd4ag5haygpihg30grh8/ancient-metagenomic-pipelines.tar.gz?rlkey=p40jtcf6fofs2ak1wfbc1cyg9&dl=0 -P /<PATH>/<TO>/<SOMEWHERE_TO_STORE>/
21-
tar -xzf ancient-metagenomic-pipelines.tar.gz
22-
cd ancient-metagenomic-pipelines
21+
conda env create -f ancient-metagenomic-pipelines.yml
22+
conda activate ancient-metagenomic-pipelines
2323
```
2424
:::
2525

@@ -29,7 +29,6 @@ There are additional software requirements for this chapter
2929
Please see the relevant chapter section in [Before you start](/before-you-start.qmd) before continuing with this chapter.
3030
:::
3131

32-
3332
## Introduction
3433

3534
A **pipeline** is a series of linked computational steps, where the output of one process becomes the input of the next. Pipelines are critical for managing the huge quantities of data that are now being generated regularly as part of ancient DNA analyses. In this chapter we will go through three dedicated ancient DNA pipelines - all with some (or all!) functionality geared to ancient metagenomics - to show you how you can speed up the more routine aspects of the basic analyses we've learnt about earlier in this text book through workflow automation.

authentication-decontamination.qmd

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ bibliography: assets/references/chapters/authentication-decontamination/referenc
55
---
66

77
::: {.callout-tip}
8-
For this chapter's exercises, if not already performed, you will need to create the [conda environment](before-you-start.qmd#creating-a-conda-environment) from the `yml` file in the following [link](https://github.com/SPAAM-community/intro-to-ancient-metagenomics-book/raw/main/assets/envs/authentication-decontamination.yml) (right click and save as to download), and once created, activate the environment with:
8+
For this chapter's exercises, if not already performed, you will need to download the chapter's dataset, decompress the archive, and create and activate the conda environment.
9+
10+
Do this, use `wget` or right click and save to download this Zenodo archive: [10.5281/zenodo.8413184](https://doi.org/10.5281/zenodo.8413184), and unpack
911

1012
```bash
11-
conda activate authentication-decontamination
13+
tar xvf authentication-decontamination.tar.gz
14+
cd authentication-decontamination/
1215
```
1316

14-
To download the data for this chapter, please download following archive with, extract the tar, and change into the directory.
15-
16-
For example
17+
You can then create the subsequently activate environment with
1718

1819
```bash
19-
wget -P /<PATH>/<TO>/<SOMEWHERE_TO_STORE>/ -O authentication-decontamination.tar.gz https://www.dropbox.com/scl/fi/hzfd2o4ji5zwx7q97diwy/authentication-decontamination.tar.gz?rlkey=84lv4fccfyxaaptqot4k9o2tz&dl=0
20-
tar -xzf authentication-decontamination.tar.gz
21-
cd authentication-decontamination
20+
conda env create -f authentication-decontamination.yml
21+
conda activate authentication-decontamination
2222
```
2323
:::
2424

@@ -28,7 +28,7 @@ There are additional software requirements for this chapter
2828
Please see the relevant chapter section in [Before you start](/before-you-start.qmd) before continuing with this chapter.
2929
:::
3030

31-
# Introduction
31+
## Introduction
3232

3333
In ancient metagenomics we typically try to answer two questions: "Who is there?" and "How ancient?", meaning we would like to detect an organism and investigate whether this organism is ancient. There are three typical ways to identify the presence of an organism in a metagenomic sample:
3434

@@ -74,7 +74,7 @@ The chapter has the following outline:
7474
- Similarity to expected microbiome source (microbial source tracking)
7575

7676

77-
# Simulated ancient metagenomic data
77+
## Simulated ancient metagenomic data
7878

7979
In this chapter, we will use 10 pre-simulated metagenomics with [gargammel](https://academic.oup.com/bioinformatics/article/33/4/577/2608651) ancient metagenomic samples from @Pochon2022-hj. \
8080

@@ -106,11 +106,11 @@ Now, after the basic data pre-processing has been done, we can proceed with vali
106106

107107
In here you will see a range of directories, each representing different parts of this tutorial. One set of trimmed 'simulated' reads from @Pochon2022-hj in `rawdata/`.
108108

109-
# Genomic hit confirmation
109+
## Genomic hit confirmation
110110

111111
Once an organism has been detected in a sample (via alignment, classification or *de-novo* assembly), one needs to take a closer look at multiple quality metrics in order to reliably confirm that the organism is not a false-positive detection and is of ancient origin. The methods used for this purpose can be divided into modern validation and ancient-specific validation criteria. Below, we will cover both of them.
112112

113-
## Modern validation criteria
113+
## Modern genomic hit validation criteria
114114

115115
The modern validation methods aim at confirming organism presence regardless of its ancient status. The main approaches include evenness / breadth of coverage computation, assessing alignment quality, and monitoring affinity of the DNA reads to the reference genome of the potential host.
116116

@@ -160,8 +160,6 @@ done
160160

161161
:::
162162

163-
164-
165163
Taxonomic k-mer-based classification of the ancient metagenomic reads can be done via KrakenUniq. However as this requires a very large database file, the results from running KrakenUniq on the 10 simulated genomes can be found in.
166164

167165
```bash
@@ -359,11 +357,11 @@ Another important way to detect reads that cross-map between related species is
359357

360358
In contrast, a large number of multi-allelic sites indicates that the assigned reads originate from more than one species or strain, which can result in symmetric allele frequency distributions (e.g., if two species or strains are present in equal abundance) (panel g) or asymmetric distributions (e.g., if two species or strains are present in unequal abundance) (panel h). A large number of mis-assigned reads from closely related species can result in a large number of multi-allelic sites with low frequencies of the derived allele (panel i). The situations (g-i) correspond to incorrect assignment of the reads to the reference. Please also check the corresponding "Bad alignments" IGV visualization to the right in the figure above.
361359

362-
## Ancient-specific validation criteria
360+
## Ancient-specific genomic hit validation criteria
363361

364362
In contrast to modern genomic hit validation criteria, the ancient-specific validation methods concentrate on DNA degradation and damage pattern as ultimate signs of ancient DNA. Below, we will discuss deamination profile, read length distribution and post mortem damage (PMD) scores metrics that provide good confirmation of ancient origin of the detected organism.
365363

366-
### Ancient status
364+
### Degradation patterns
367365

368366
Checking evenness of coverage and alignment quality can help us to make sure that the organism we are thinking about is really present in the metagenomic sample. However, we still need to address the question "How ancinet?". For this purpose we need to compute **deamination profile** and **read length distribution** of the aligned reads in order to prove that they demonstrate damage pattern and are sufficiently fragmented, which would be a good evidence of ancient origin of the detected organisms.
369367

@@ -437,7 +435,7 @@ pydamage analyze -w 30 -p 14 filtered.sorted.bam
437435
```
438436
:::
439437

440-
# Microbiome contamination correction
438+
## Microbiome contamination correction
441439

442440
Modern contamination can severely bias ancient metagenomic analysis. Also, ancient contamination, i.e. entered *post-mortem*, can potentially lead to false biological interpretations. Therefore, a lot of efforts in the ancient metagenomics field are directed on establishing methodology for identification of contaminants. Among them, the use of negative (blank) control samples is perhaps the most reliable and straightforward method. Additionally, one often performs microbial source tracking for predicting environment (including contamination environment) of origin for ancient metagenomic samples.
443441

bare-bones-bash.qmd

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,19 @@ author: Thiseas C. Lamnidis, Aida Andrades Valtueña
44
---
55

66
::: {.callout-tip}
7-
For this chapter's exercises, if not already performed, you will need to [create the conda environment](before-you-start.qmd#creating-a-conda-environment) from the `yml` file in the following [link](https://github.com/SPAAM-community/intro-to-ancient-metagenomics-book/raw/main/assets/envs/bare-bones-bash.yml) (use `wget`, or right click and save as to download). Once created, activate the environment with:
7+
For this chapter's exercises, if not already performed, you will need to download the chapter's dataset, decompress the archive, and create and activate the conda environment.
8+
9+
Do this, use `wget` or right click and save to download this Zenodo archive: [10.5281/zenodo.8412661](https://doi.org/10.5281/zenodo.8412661), and unpack
10+
11+
```bash
12+
tar xvf bare-bones-bash.tar.gz
13+
cd bare-bones-bash/
14+
```
15+
16+
You can then create the subsequently activate environment with
817

918
```bash
19+
conda env create -f bare-bones-bash.yml
1020
conda activate bare-bones-bash
1121
```
1222
:::
@@ -735,7 +745,7 @@ To delete the conda environment
735745
conda remove --name bare-bones-bash --all -y
736746
```
737747

738-
### Conclusion
748+
## Summary
739749

740750
You should now know the basics of working on the command line, like:
741751

before-you-start.qmd

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,7 @@ These instructions have been tested on Ubuntu 22.04, but should apply to most Li
7575

7676
Once `conda` is installed and `bioconda` configured, at the beginning of each chapter, to create the `conda` environment from the `yml` file, you will need to run the following:
7777

78-
1. Download the `conda` env file the top of the chapter by right clicking on the link and pressing 'save as', or copy and paste the contents of the file to an empty file in your terminal.
79-
80-
For example:
81-
82-
```bash
83-
wget https://<URL>/<FILE_NAME>.yml
84-
```
78+
1. Download and unpack the `conda` env file the top of the chapter by right clicking on the link and pressing 'save as'. Once uncompressed, change into the directory.
8579

8680
2. Then you can run the following conda command to install the software into it's dedicated environment
8781
@@ -114,7 +108,7 @@ You only have to run the environment creation once!
114108
To reuse the environment, just run step 4 and 5 as necessary.
115109
116110
::: {.callout-tip}
117-
To delete a conda software environment, just get the path listed on `conda env list` and delete the folder with `rm -rf <path>`.
111+
To delete a conda software environment, run `conda remove --name <NAME_OF_ENV> --all -y`
118112
:::
119113
120114
## Additional Software {.unnumbered}

citing-this-book.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The source material for this book is located on GitHub:
66

77
If you wish to cite this book, please use the following bibliographic information
88

9-
> James A. Fellows Yates, Christina Warinner, Alina Hiß, Arthur Kocher, Clemens Schmid, Irina Velsko, Maxime Borry, Megan Michel, Nikolay Oskolkov, Sebastian Duchene, Thiseas Lamnidis, Aida Andrades Valtueña, Alexander Herbig, & Alexander Hübner. (2023). Introduction to Ancient Metagenomics. In Introduction to Ancient Metagenomics (Version 2022). Zenodo. DOI: [10.5281/zenodo.8027281](https://doi.org/10.5281/zenodo.8027281)
9+
> James A. Fellows Yates, Christina Warinner, Alina Hiß, Arthur Kocher, Clemens Schmid, Irina Velsko, Maxime Borry, Megan Michel, Nikolay Oskolkov, Sebastian Duchene, Thiseas Lamnidis, Aida Andrades Valtueña, Alexander Herbig, Alexander Hübner, Kevin Nota, Robin Warner, Meriam Guellil. (2023). Introduction to Ancient Metagenomics (Edition 2023). Zenodo. DOI: [10.5281/zenodo.8027281](https://doi.org/10.5281/zenodo.8027281)
1010
1111
<!-- TODO Update authors after each summer school -->
1212

0 commit comments

Comments
 (0)