Mike Lee
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # STAMPS 2024 MAG concepts --- [toc] --- ## Overview Metagenomics attempts to sequence all the DNA present in a sample. It can provide a window into the taxonomy and functional potential of a mixed community. There are a **ton** of things that can be done with metagenomics data as this *non-exhaustive* overview figure begins to highlight: <a href="https://astrobiomike.github.io/images/metagenomics_overview.png "><img src="https://astrobiomike.github.io/images/metagenomics_overview.png "></a> This page is an introduction to some concepts about one of the things we can try to do with metagenomics data: recovering **m**etagenome-**a**ssembled **g**enomes (MAGs). --- ## Key concepts ### What are MAGs? MAGs (metagenome-assembled genomes) are most often not the same thing as isolate genomes. An isolate genome is usually extremely close to an individual-genome assembly – like a microbe isolated on a plate -> a colony from that plate is selected and grown overnight in a flask -> DNA is extracted and sequenced. Even then, some small number of mutations will exist in the population that grew from that starting isolation, but we consider it virtually an identical population that was sequenced and assembled. In many natural microbial communities, just like there is some variation that occurs overnight in a flask, some variation exists within what we'd consider "the same bug" (or "population"). And often, this level of variation will be collapsed when we perform an assembly and recover a MAG. So it is best to think of MAGs as something like composite representative genomes of *very* closely related genomic lineages. This isn't a problem necessarily, MAGs are still extremely valuable! ### Why are MAGs valuable? Relatively recently, the recovery of MAGs has become a very powerful approach in microbial ecology, drastically expanding the known Tree of Life by granting us genomic access to as-yet unculturable microbial populations and expanding our understanding of the breadth of biodiversity on Earth (e.g., [Hug et al. 2016](https://www.nature.com/articles/nmicrobiol201648); [Parks et al. 2017](https://www.nature.com/articles/s41564-017-0012-7)). **Basically MAGs are opening our eyes to the real diversity of microbial genomic diversity out there 🎉** ### What is a bin vs a MAG? The process of recovering MAGs typically involves assembly of metagenomic data (taking shorter reads and stitching them together to create longer contigs) and then "binning" (grouping) contigs together based on characteristics such as sequence composition and relative abundance. After we "bin" contigs together, we typically call a groups of contigs we created "bins". Then based on passing some quality thresholds, we will often say high-quality bins are MAGs. This is an arbitrary delineation that doesn't have one cutoff, but a common one used might be >90% estimated completeness and <10% estimated redundancy (sometimes called contamination). Bins that meet that criteria might be "promoted" to being called MAGs. Other commonly used metrics are listed in [Bowers et al. 2017](https://www.nature.com/articles/nbt.3893). The important part is to be clear about what thresholds and methods we're using for quality assessment and MAG delineation. ### How do we recover MAGs conceptually? A typical process for recovering bins is depicted in the slide below (the numbers 5 and 2 represent "abundances" of those unreasonably perfect genomes following DNA extraction): ![image](https://hackmd.io/_uploads/rkUb9cA_R.png) [PDF download](https://ndownloader.figshare.com/files/16241105); [keynote](https://ndownloader.figshare.com/files/16240550); [powerpoint](https://ndownloader.figshare.com/files/16240814) This can be done with an individual sample, but it becomes much more powerful and more accurate when multiple samples can be co-assembled (when appropriate). This is because instead of just having coverage ("abundance") information from one sample, we can then have differential coverage information across many samples for each starting genomic population. This can improve our ability to properly bin the assembled contigs together. When to co-assemble or not is not a straightforward thing, some discussion on that can be found [here](https://astrobiomike.github.io/genomics/metagen_anvio#what-is-a-co-assembly). ### MAGs are almost always a subset of the data With metagenomics data, we can try to look at all the data we recovered by just looking at the starting reads we recovered. Where we try to taxonomically classify them and functionally annotate them just as they are, for example. A plus to this is we're trying to look at "all" the data, but a downside is that it can be difficult to taxonomically classify and functionally annotate (what is most frequently) short reads. We can also try to perform an assembly with the reads we collected in an effort to get longer contigs, and then do things like taxonomically classify our contigs and call genes and then functionally annotate those genes. Taxonomic classification and functional annotation generally improve with longer sequences, so that is a plus to assembly. However, often not all of our reads will assemble. So already an assembly is a subset of our starting data. It is common to map all our reads we used to make an assembly, to that very assembly they made, in order to get an idea of how much of our starting data is represented by the assembly. Maybe 90% of our reads map back to our assembly, which tells us it represents like 90% of our reads. It is not uncommon for some environments to yield assemblies that capture much lower proportions of our starting reads. When we bin contigs, we are then getting a subset of our assembly (only those contigs that binned successfully into groups). And then if we focus only on those bins that surpass certain quality thresholds that we deem as MAGs, we're looking at a subset of even those. Just like with mapping our starting reads to the assembly to get an idea of how much of our starting data is represented by the assembly, we can do a similar thing and map our reads to our recovered MAGs to get an idea of how much of our starting data they encompass. The thing to keep in mind is that an assembly is usually a subset of the starting reads, and bins/MAGs are then a subset of the assembly. Which is totally fine! If we want, we can examine our reads and our MAGs. They are just different levels of resolution into a system :+1: --- ## Some workflows for MAG-recovery - In my [bit package](https://github.com/AstrobioMike/bit/tree/master?tab=readme-ov-file#bioinformatics-tools-bit) I have an assembly-focused metagenomics workflow that includes MAG recovery and characterization that can be found [**here**](https://github.com/AstrobioMike/bit/tree/master/workflows/metagenomics-wf#overview). - [Metawrap](https://github.com/bxlab/metaWRAP?tab=readme-ov-file#metawrap---a-flexible-pipeline-for-genome-resolved-metagenomic-data-analysis) runs a few binning programs and tries to identify the best bins out of the possibilities. ---

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully