Skip to content

Commit

Permalink
Merge pull request #61 from SPAAM-community/post-session-cleanup
Browse files Browse the repository at this point in the history
Post session cleanup
  • Loading branch information
jfy133 authored Oct 6, 2023
2 parents 9741ddf + bed1373 commit 1a417ed
Show file tree
Hide file tree
Showing 18 changed files with 170 additions and 179 deletions.
3 changes: 1 addition & 2 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ book:
cover-image: "assets/images/cover.png"
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)."
page-navigation: true
downloads: [pdf, epub]
#downloads: [pdf, epub]
site-url: https://spaam-community.github.org/intro-to-ancient-metagenomics-book
favicon: favicon.png
open-graph: true
Expand Down Expand Up @@ -50,7 +50,6 @@ book:
chapters:
- accessing-ancientmetagenomic-data.qmd
- ancient-metagenomic-pipelines.qmd
- summary.qmd
- part: appendices.qmd
chapters:
- resources.qmd
Expand Down
17 changes: 9 additions & 8 deletions accessing-ancientmetagenomic-data.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,24 @@ bibliography: assets/references/chapters/accessing-ancientmetagenomic-data/refer
---

::: {.callout-tip}
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:
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.

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

```bash
conda activate accessing-ancientmetagenomic-data
tar xvf accessing-ancientmetagenomic-data.tar.gz
cd accessing-ancientmetagenomic-data/
```

To download the data for this chapter, please download following archive with, extract the tar, and change into the directory.

For example
You can then create the subsequently activate environment with

```bash
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>/
tar -xzf accessing-metagenomic-data.tar.gz
cd accessing-metagenomic-data
conda env create -f accessing-ancientmetagenomic-data.yml
conda activate accessing-ancientmetagenomic-data
```
:::


## Introduction

In most bioinformatic projects, we need to include publicly available comparative data to expand or compare our newly generated data with.
Expand Down
17 changes: 8 additions & 9 deletions ancient-metagenomic-pipelines.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ csl: american-journal-of-physical-anthropology.csl
---

::: {.callout-tip}
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:
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.

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

```bash
conda activate ancient-metagenomic-pipelines
tar xvf ancient-metagenomic-pipelines.tar.gz
cd ancient-metagenomic-pipelines/
```

To download the data for this chapter, please download following archive with, extract the tar, and change into the directory.

For example
You can then create the subsequently activate environment with

```bash
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>/
tar -xzf ancient-metagenomic-pipelines.tar.gz
cd ancient-metagenomic-pipelines
conda env create -f ancient-metagenomic-pipelines.yml
conda activate ancient-metagenomic-pipelines
```
:::

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


## Introduction

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.
Expand Down
32 changes: 15 additions & 17 deletions authentication-decontamination.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ bibliography: assets/references/chapters/authentication-decontamination/referenc
---

::: {.callout-tip}
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:
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.

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

```bash
conda activate authentication-decontamination
tar xvf authentication-decontamination.tar.gz
cd authentication-decontamination/
```

To download the data for this chapter, please download following archive with, extract the tar, and change into the directory.

For example
You can then create the subsequently activate environment with

```bash
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
tar -xzf authentication-decontamination.tar.gz
cd authentication-decontamination
conda env create -f authentication-decontamination.yml
conda activate authentication-decontamination
```
:::

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

# Introduction
## Introduction

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:

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


# Simulated ancient metagenomic data
## Simulated ancient metagenomic data

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. \

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

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/`.

# Genomic hit confirmation
## Genomic hit confirmation

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.

## Modern validation criteria
## Modern genomic hit validation criteria

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.

Expand Down Expand Up @@ -160,8 +160,6 @@ done

:::



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.

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

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.

## Ancient-specific validation criteria
## Ancient-specific genomic hit validation criteria

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.

### Ancient status
### Degradation patterns

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.

Expand Down Expand Up @@ -437,7 +435,7 @@ pydamage analyze -w 30 -p 14 filtered.sorted.bam
```
:::

# Microbiome contamination correction
## Microbiome contamination correction

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.

Expand Down
14 changes: 12 additions & 2 deletions bare-bones-bash.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,19 @@ author: Thiseas C. Lamnidis, Aida Andrades Valtueña
---

::: {.callout-tip}
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:
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.

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

```bash
tar xvf bare-bones-bash.tar.gz
cd bare-bones-bash/
```

You can then create the subsequently activate environment with

```bash
conda env create -f bare-bones-bash.yml
conda activate bare-bones-bash
```
:::
Expand Down Expand Up @@ -735,7 +745,7 @@ To delete the conda environment
conda remove --name bare-bones-bash --all -y
```

### Conclusion
## Summary

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

Expand Down
10 changes: 2 additions & 8 deletions before-you-start.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,7 @@ These instructions have been tested on Ubuntu 22.04, but should apply to most Li

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:

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.

For example:

```bash
wget https://<URL>/<FILE_NAME>.yml
```
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.

2. Then you can run the following conda command to install the software into it's dedicated environment
Expand Down Expand Up @@ -114,7 +108,7 @@ You only have to run the environment creation once!
To reuse the environment, just run step 4 and 5 as necessary.
::: {.callout-tip}
To delete a conda software environment, just get the path listed on `conda env list` and delete the folder with `rm -rf <path>`.
To delete a conda software environment, run `conda remove --name <NAME_OF_ENV> --all -y`
:::
## Additional Software {.unnumbered}
Expand Down
2 changes: 1 addition & 1 deletion citing-this-book.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The source material for this book is located on GitHub:

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

> 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)
> 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)
<!-- TODO Update authors after each summer school -->

Expand Down
Loading

0 comments on commit 1a417ed

Please sign in to comment.