Taylor Reiter
    • 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
    # Assembly and binning lesson learner questions ###### tags: `stamps2022` [toc] Below I've typed up the questions that the learners asked using their pink sticky notes. I've tried to sort them into general categories. ## General questions + **Is there any step that involves PCR in metagenomic sequencing, and if so, how?** + Typically yes (Mike *thinks* this is most typical, but not certain). Random hexamer or nonamer primers are added in order to try to amplify "everything" to generate larger quantities of DNA. (Daniel is one of our participants who might know more about this) + Some sequencing technologies rely on PCR in the sequencing process (e.g., Illumina). The random priming protocol described above is frequently used for low input DNA samples such as single cell sequencing. + **both forward and reverse reads are sequenced, but are they processed together?** + Usually, yes. Because PE reads add information about what reads belong together, tools like to take advantage of this information to produce more accurate outputs (e.g. longer contigs) + **When should you use metagenomics vs. 16S sequencing?** + [Here](https://astrobiomike.github.io/misc/amplicon_and_metagen) is a good overview of what each is and isn't useful for. But for a general response (with the usual caveate that things can always be more nuanced than general responses allow for, ha), if we are interested in generating hypotheses about potential functions, metagenomics is the better way to go as amplicon sequencing (of typical marker-genes like 16S) does not directly tell us anything about functional genes. But even if eventually trying to to a place to talk about potential functions, amplicon sequencing might be a useful way to first deal with many, many samples e.g. between treatments or across environmental gradients to then help us decide which samples to explore more deeply with metagenomics or other methods. + Here's another great source! https://merenlab.org/momics/ + **I'm still sort of confused how you can establish identity of a sequence without a reference database (exclusively de novo)** + I (Mike) would say I agree with what you're thinking in that we can't establish the identity of a sequence without a reference database (if by identity we mean something like a taxonomic label or a functional annotation). But we can assemble, analyze, and group things without dependence on any reference database. ## Tools and parameters + **Pros/cons to different methods/tools and how to choose them** + See below! + **I am always worried about whether I am using the right tool for the right job, specially when tools are always evolving.** + This is a hard problem. I (Taylor) would say you have to start _somewhere_. There are a few strategies you can use to figure out where: + Read the literature and find a couple papers that have done something similar to what you've done. Look at the tools that they used to do it, and those are probably reasonable tools. Maybe focus on papers published in the last ~3 years, and you'll probably largely see tools that are still popular in the field. + Read review papers that compare and contrast tools. Look for statements of when tools do well. However, be careful about papers where the authors are evaluating their own tool, as they can find or create data sets where their tool will always do best. This isn't a problem, just something to be aware of + Ask on twitter! This is an astonishingly great way to get a lot of rapid feedback from experts and other opiononate people + Otherwise leverage your network...which now includes STAMPS2022. The slack will stay open indefinitely (?), and people often lurk for many months or years after the course. A lot of the instructors are on twitter too. + Also, try a few tools and see if they give you what you need (and also if they differ a lot from each other in terms of results, which should raise warning flags). More important than figuring out which tool to use, is to develop "sanity checks" that will tell you whether a tool gives you the right answer (see the discussion below about evaluating assemblies). ## Assembly + **How to evaluate assembly** + Some ideas: + Length of contigs -- it's useful to know how fragmented or contiguous an assembly is, even if you don't necessarily want to strive for very long in every case. + Re: length of contigs -- means and medians usually don't mean much since there are many small contigs that drag those values down, and ultimately make different assemblies difficult or impossible to compare to each other. Instead you can use various versions of metrics that focus on the large contigs. N50 is one such number -- it is the size of the largest contig C such that the sizes of all contigs larger than C add up to half of the genome size. For a metagenome you may not know what the "metagenome size" means, but you can use the same idea, substituting some appropriate cumulative assembly size. For example, N1M could represent the size of the largest contig C such that the sizes of all contigs larger than C add up to 1 Mbp. + "Read recruitment" -- the number of reads that map back to the assembly. How many of the reads in your metagenome end up actually being represented by the assembly? + You could taxonomically classify the reads, and then taxonomically classify the assembly (see the sourmash tutorial!). How many taxons get dropped out? + I (taylor) think that how you evaluate an assembly may depend on your use case, but the things above will help you "get to know" your assembly, which is helpful. + **What is the "scaffold" in the gaps between contigs?** + I'm (taylor) interpretting this question to ask what a scaffold is. Sometimes, the gap between paired end reads is large enough that 1) we know that two chunks of DNA occur next to each other in a genome and 2) The contig that one paired end read maps to assembles, and the contig that another paired end read maps to also assembles, but the paired end reads map to _different_ contigs. If we know our paired end insertion size is ~400 bp, we can _scaffold_ these contigs together, stringing them together with Ns. + Given that library sizes are fairly small nowadays (400-600bp), the gaps tend to be quite small, probably less than about 200bp. + **A clarification regarding the three different assembly methods** + Greedy approach: repeatedly find a pair of sequences that have a large amount of overlap and merging the two sequences into one longer sequence. + https://www.youtube.com/watch?v=KO2UaG8eKEw + Overlap lay out consensus: Reads are provided to the algorithm. Overlapping regions are identified. Each read is graphed as a node and the overlaps are represented as edges joining the two nodes involved. The algorithm determines the best path through the graph (Hamiltonian path). Redundant information (i.e., unused nodes and edges) is discarded. This process is carried out multiple times and resulting sequences are combined to give the final consensus sequence that represents the genome. ([source](https://www.researchgate.net/publication/26266221_Computational_Biology_Methods_and_Their_Application_to_the_Comparative_Genomics_of_Endocellular_Symbiotic_Bacteria_of_Insects/figures?lo=1)) + https://www.youtube.com/watch?v=hB2i_Uwm-HQ + de bruijn graph: break reads down into k-mers. Each k-mer becomes a node in the graph. Identify all k - 1 overlaps between all k-mers, and draw edges between these nodes in the graph. + https://www.youtube.com/watch?v=OY9Q_rUCGDw + **Assembly methods** + See above :) + **Is assembly very different for short and long reads?** + Yes and no :) All (?) short and long read assemblers use one of three same basic approaches (outlined above): + overlap layout consensus + de bruijn graphs + greedy approach + In short reads, because they're so short and many of the reads don't span repetitive or complex regions, de Bruijn graphs work best. In a de Bruijn graph, each sequence (e.g. k = 31) only occurs once in the graph. This means that repetitive regions get collapsed, which isn't a problem for short reads bc we can't resolve them anyway. In long reads, we don't want to collapse repetitive regions that we have sequenced through, so the overlap layout consensus method ends up working better. The other heuristics for short vs long read assembly _do_ vary greatly, but they also vary by tool. + **What are some strategies to assemble HVR regions of genomes?** + This is a great question, highly variable regions are really hard to assemble! I (Taylor) don't have a great answer, but there are two strategies you might look into: + Assembly graphs to resolve these regions, a la [metacherchant](https://academic.oup.com/bioinformatics/article/34/3/434/4575138) + If the HVR is in a gene sequence that encodes for a protein, use a protein assembler like [PLASS](https://www.nature.com/articles/s41592-019-0437-4) + **what are some caveats to a co-assembly? In terms of trying to associate a MAG to a specific environment condition/sample?** + I'd say (Mike) that the same caveats that apply to a single assembly also apply to a co-assembly, in that what we are recovering are representations of things from super-closely related populations – e.g., we don't get 1 genome, we get a representative genome comprised of multiple genomes of a super-closely related population. Generally speaking, this may be happening to a greater extent with a co-assembly depending on what our samples are that we are co-assembling, but it definitely is not always happening to a greater extent than with individual assemblies). This is because even a single sample can host very diverse populations, or multiple samples may all hold the same \*not-very-diverse populations. And ultimately the sequence diversity affects what the assembler does, and the assembler doesn't know or care if it is trying to assemble multiple samples or one. Co-assembly can also make it easier to compare across our samples (as we then have one reference assembly for all samples that we can then map our reads and check for things like differential abundance of functions). When to co-assemble and when not is definitiely one of those fun questions that is not straightforward :+1: + A side-effect of strain variability (which is amplified in a co-assembly) is that the assembly may end up more fragmented as the assembler gets confused by the ambiguity. There are no good ways currently to do co-assembly well, so the results will be highly dependent on how well behaved your datasets are. + Another issue with co-assembly is run-time. MegaHit, which is one of the fastest assemblers, can run for over a day on even single metagenomes, so once you mix multiple samples you may quickly run out of time or memory. ## Binning + **What is binning (still don't understand)? Can QIIME2 be used for binning?** + "Binning" is attempting to group contigs (longer stretches of DNA we assembled from individual reads) into groups that we think represents a very closely related population of genomes (like what we might generally consider "the same microbe", even though there are some variations in their individual genomes). There is a nice slide at the top of [this page](https://astrobiomike.github.io/genomics/metagen_anvio) (just beneath the first busy overview figure) that might help. + QIIME2 is an infrastructure that incorporates many tools developed by many people that can be used outside of QIIME2 also. I don't think is has much built in for metagenomics yet, so likely no binning capabilities (it is primarily amplicon focused). + **How does it go from contigs to assembly bins?** + There is a nice slide at the top of [this page](https://astrobiomike.github.io/genomics/metagen_anvio) (just beneath the first busy overview figure) that might help. + **Tetramernucleotide frequency** + A tetramer is a k-mer of length 4. So ATCG, ATCC, ATCT, ATCA ... There are 256 of these nucleotide combinations. Because eco-evolutionary forces act on both GC content and codon usage, each genome has a tendency to use a specific set of tetramers more than others. This leads to varying abundances of these 4-mers in a genome. These abundances can be used to cluster genomes, or contigs from genomes, thereby separating that genome from any other genome. Binners take advantage of this signal, which is consistent across a genome, to group contigs together. However, this signal is squirelly enough that you need at least 2000-2500 base pairs for this to work well. + **Using tetramernucleotide frequency to bin** + See above :) + **What is the importance of GC content and 'k-mer', and how are these used for evaluation?** + See above :) + **How binning works...is k-mer frequency different enough between species/strains?** + Not always, probably usually not. But this is why "coverage" is so powerful. There is a nice slide at the top of [this page](https://astrobiomike.github.io/genomics/metagen_anvio) (just beneath the first busy overview figure) that might help (Mike's answer). + **How can we tell quality of binning based on FASTQ file** + Answer: You can't! The FASTQ file contains the raw reads, and while these are used to build the assembly and to generate coverages that are used to bin the contigs, there isn't a direct and clear way to determine the quality of the bin from the fastq file alone. + **If the level (strain, species, etc) of binning is up to us to decide** + No, it's not. You may be able to tune the binning parameters a bit to form less or more conservative bins, but generally the binning approach is "unsupervised", i.e., it clusters contigs based on how similar they are in terms of coverage profiles and k-mer frequencies. + **Does binning happen at the genome or chromosome level?** + Binning happens at the level of the assembly, which is composed on contiguous sequences. In theory, a contig could represent a full genome or a chromosome, or part of a genome or a chromosome. So in a way, it happens at both levels. + One major caveat with binning is that horizontally-transfered DNA (e.g., pro-phage regions) have different nucleotide composition than the main chromosome, and they tend not to be included in the bins. ## K-mers + **What k-mers are and why they are useful** + A k-mer is a word of length k in a nucleotide (or amino acid) sequences. See Titus' [lecture](https://github.com/mblstamps/stamps2022/blob/main/kmers_and_sourmash/2022-stamps-assembly-free%20class.pdf)/[tutorial](https://hackmd.io/vYaK2UngTWSkKmcpQMP6NA?view) for more information about k-mers! + **K-mers -- do you have to break up your reads more to have this?** + Yes, however the user doesn't usually do this themselves. Each tool will break down the reads into the k-mers of whatever length they need them. ## Complex environments + **I am still confused about how I can use metagenomics if I am working with a very diverse, less well characterized environment.** + I think it depends a lot on your environment. Here are some strategies below, and you might need to try...all of them to find one that works :laugh: + de novo metagenome assembly & binning, e.g. with ATLAS + you could try something like PLASS to assemble in protein space. Amino acids often have less micro-diversity, and this could help you get _something_ out. We have found that PLASS often outputs combinatorial amino acid sequences, so you might need some aggressive clustering to work with the results. + Assembly graphs! see the answers below if you want to try any of these approaches. Also feel free to reach out on the STAMPS slack if you want support with this...an outsized proportion of the STAMPS instructors have used assembly graphs compared to the population (Amy idk if thats a real statistical statement) + **How to approach *de novo* sequencing in ocean environment when there are few references** + See above - de novo assembly or ASV/OTU clustering does not require you to know the references. Phylogenetic analyses can help you figure out where to place the "unknown". Also, a lot of projects are using single cell data to help figure out which chunks of DNA in the environment are actually coming from a single organism. ## :tada: Assembly graphs :tada: + **How to read/interpret a metagenome assembly graph** + [Here](https://spacegraphcats.github.io/spacegraphcats/0a-primer/) is a primer on metagenomes and assembly graphs + I want to build and analyze assembly graphs myself + https://spacegraphcats.github.io + I want to run workflows that have been run before and see if they work for me + https://github.com/spacegraphcats/2018-paper-spacegraphcats: metagenome bin completion (e.g. scooping in reads that didn't assemble) + https://github.com/dib-lab/2021-metapangenome-example (metapangenome analysis with assembly graphs) + https://github.com/dib-lab/2022-dominating-set-differential-abundance-example (differential abundance analysis on the graph) + I want to learn more about the biological results that can come out of assembly graph analysis + https://www.biorxiv.org/content/10.1101/2022.06.30.498290v1 + https://genomebiology.biomedcentral.com/articles/10.1186/s13059-020-02066-4 + https://www.biorxiv.org/content/10.1101/2022.06.27.497795v1

    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