Answers.Body: <p>NB: &quot;merging PE reads&quot; (such as e.g. FLASH does) is not the same as &quot;sequence assembly from PE reads&quot; (what MetaSPAdes does). The latter generates contigs, the former generates (some) merged shotgun library inserts. I think you want sequence assembly, i.e. a tool like MetaSPAdes.</p>
  <p><strong>Don't be tricked by the loose language of &quot;merging&quot; that is sometimes applied to the sequence assembly problem. It is much more complicated than that.</strong></p>
  <p>If you want to learn more about sequence assembly, I suggest you read the <a href="https://en.wikipedia.org/wiki/Sequence_assembly" rel="nofollow noreferrer">sequence assembly</a> wikipedia page.</p>
  <p>I would probably recommend <a href="https://github.com/voutcn/megahit" rel="nofollow noreferrer">MegaHit</a> over metaSPAdes, because it requires much less memory / runtime, and lower frequency of errors.</p>
  <p>But generally speaking, both programs are building different flavors of <a href="https://www.cs.jhu.edu/%7Elangmea/resources/lecture_notes/assembly_dbg.pdf" rel="nofollow noreferrer">de Bruijn Graphs</a> from metagenomic reads to generate contigs/scaffolds. This is the accepted method by this point for Illumina metagenomic data, because it is the method that is capable of handling the amount of small pieces of data in a tractable fashion. Alternatives such as <a href="https://www.cs.jhu.edu/%7Elangmea/resources/lecture_notes/assembly_olc.pdf" rel="nofollow noreferrer">overlap-layout-consensus graphs</a> or <a href="https://bioinformaticshome.com/tools/wga/descriptions/SGA.html" rel="nofollow noreferrer">string graphs</a> just don't work as well for the metagenomic problem.</p>
  <p>You are probably looking for methods that talk about complicated, computationally complex assembly algorithms and graphical methods for summarizing lots of short reads. You are not looking for simple read processing/alignment tools like BBMap/BBTools or FLASH. <strong>To reiterate, simple read merging tools will not give you assembled contigs.</strong></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-05T12:05:31.377Z
Answers.Text: Thank you, this had helped a lot, I'm definitely struggling with some of the subtleties of data processing. My end goal is to do Taxonomic and Functional analysis in MEGAN, but I've been told that it's only designed to use R1 data. I thought I'd attempt to make the most of the sequencing data that I do have to get into a format suitable for MEGAN. Would using  MegaHit/metaSPAdes mean I wouldn't have to put my data through DIAMOND ?  I'm still very new to this and just making sure I have all the steps correct
Answers.UserDisplayName: dunc4n
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-05T19:11:33.550Z
Answers.Text: I am not sure what you mean by only R1 data. I don't think that assembly will make DIAMOND work any better, though it may be helpful for some MEGAN workflows. For examples of both assembled/raw shotgun data for MEGAN+DIAMOND, I'd suggest this ref: https://currentprotocols.onlinelibrary.wiley.com/doi/10.1002/cpz1.59
Answers.UserDisplayName: Maximilian Press
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-06T13:37:06.183Z
Answers.Text: Thank you, I'm still very much getting to grips with this.  I originally did 150 paired-end sequencing on my samples. I think DIAMOND/MEGAN only accepts a single input file (What I meant by only using Read1 data, I wasn't being clear there.) I thought trying to merge overlapping reads would give me longer DNA sequences for Taxonomic binning.
Answers.UserDisplayName: dunc4n
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-06T16:01:23.167Z
Answers.Text: @dunc4n I'll first note as a tip for the future that having this intention stated in your question would make it a lot easier to understand what you need. I suppose that it's formally possible that read merging would improve things slightly, in practice I am not sure that it makes any difference. I would follow the example of the reference that I linked in my earlier comment, or really any other paper that uses DIAMOND and MEGAN, to understand what to do to preprocess data for those tools. Is there a reason why this won't work for you?
Answers.UserDisplayName: Maximilian Press
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-07T07:47:53.890Z
Answers.Text: I'll keep that in mind in the future thanks. I don't see any reason why it would work. What had me confused was when I mentioned my plans I was advised that FLASh wouldn't be suitable to generate contigs from my metagenome samples. I had planned to generate contigs from Read1 + Read2  and potentially cat on the output of the unmerged read by FLASh or align them separately and join them post assembly.   I wonder if when I mentioned it originally They thought I was intending to rely on it for contig generation and assembly.   Thank you again for your input it's been really helpful !
Answers.UserDisplayName: dunc4n
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-07T16:17:57.850Z
Answers.Text: @dunc4n  yeah, so I think that the source of the confusion is that merged reads aren't "contigs". Merged reads may represent "contiguous sequences" but the word "contig" has a [rather specific meaning](https://www.genome.gov/genetics-glossary/Contig) in genomics. I'm still not totally clear on the workflow here, but it seems like the issue is resolved at least.
Answers.UserDisplayName: Maximilian Press
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-02T20:00:12.580Z
Answers.LastActivityDate: 2022-07-02T20:00:12.580Z
Answers.UserDisplayName: Maximilian Press
Body: <p>I'm a wet-lab biologist desperately trying to get to grips with some Bioinformatics.</p>
  <p>I have some shotgun Illumina paired-end data from a gut microbiome project I'm working on. I'm considering how to go about generating contigs from reads. I've been recommended to use SPAdes which I'm reading up on at the moment.</p>
  <p>Originally I was thinking of using FLASh however I was told it might not be suitable for metagenomic data.</p>
  <p><strong>My question simply is, what makes certain programs suitable for merging paired-end reads from a genome but not a metagenome?</strong> I find myself a little spoilt for choice (eg. FLASh/SPAdes/BBmap... )  with bioinformatics tools I'm always concerned I'm picking the wrong one.</p>
  <p>Should I ideally be running my data through a couple of tools and comparing them?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-07-01T14:17:02.833Z
Comments.Text: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Comments.UserDisplayName: Community
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-07-01T15:08:45.363Z
Comments.Text: Is the source material metagenomics or culture isolates?
Comments.UserDisplayName: M__
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-07-02T04:06:27.300Z
Comments.Text: What is the purpose of your project? You have mentioned, "merging paired-end reads", but it's unclear why this would be helpful. If this is for quantifying species or determining proportions, then you'd be better off with a metagenomic mapping tool (e.g. kraken2).
Comments.UserDisplayName: gringer
Tags: <metagenome>
Title: Generating contigs from illumina Paired End Reads (Metagenome)
ThreadText: # Generating contigs from illumina Paired End Reads (Metagenome)
  
  (Asked by: username_0 on 2022-07-01)
  
  I'm a wet-lab biologist desperately trying to get to grips with some Bioinformatics.
  
  I have some shotgun Illumina paired-end data from a gut microbiome project I'm working on. I'm considering how to go about generating contigs from reads. I've been recommended to use SPAdes which I'm reading up on at the moment.
  
  Originally I was thinking of using FLASh however I was told it might not be suitable for metagenomic data.
  
  **My question simply is, what makes certain programs suitable for merging paired-end reads from a genome but not a metagenome?** I find myself a little spoilt for choice (eg. FLASh/SPAdes/BBmap... ) with bioinformatics tools I'm always concerned I'm picking the wrong one.
  
  Should I ideally be running my data through a couple of tools and comparing them?
  
  **Tags:** metagenome
  
  > **Comments:**
  > **username_1**: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.  
  > **username_2**: Is the source material metagenomics or culture isolates?  
  > **username_3**: What is the purpose of your project? You have mentioned, "merging paired-end reads", but it's unclear why this would be helpful. If this is for quantifying species or determining proportions, then you'd be better off with a metagenomic mapping tool (e.g. kraken2).  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2022-07-02. Score: 2 | Accepted answer
  
  NB: "merging PE reads" (such as e.g. FLASH does) is not the same as "sequence assembly from PE reads" (what MetaSPAdes does). The latter generates contigs, the former generates (some) merged shotgun library inserts. I think you want sequence assembly, i.e. a tool like MetaSPAdes.
  
  **Don't be tricked by the loose language of "merging" that is sometimes applied to the sequence assembly problem. It is much more complicated than that.**
  
  If you want to learn more about sequence assembly, I suggest you read the [sequence assembly](https://en.wikipedia.org/wiki/Sequence_assembly) wikipedia page.
  
  I would probably recommend [MegaHit](https://github.com/voutcn/megahit) over metaSPAdes, because it requires much less memory / runtime, and lower frequency of errors.
  
  But generally speaking, both programs are building different flavors of [de Bruijn Graphs](https://www.cs.jhu.edu/%7Elangmea/resources/lecture_notes/assembly_dbg.pdf) from metagenomic reads to generate contigs/scaffolds. This is the accepted method by this point for Illumina metagenomic data, because it is the method that is capable of handling the amount of small pieces of data in a tractable fashion. Alternatives such as [overlap-layout-consensus graphs](https://www.cs.jhu.edu/%7Elangmea/resources/lecture_notes/assembly_olc.pdf) or [string graphs](https://bioinformaticshome.com/tools/wga/descriptions/SGA.html) just don't work as well for the metagenomic problem.
  
  You are probably looking for methods that talk about complicated, computationally complex assembly algorithms and graphical methods for summarizing lots of short reads. You are not looking for simple read processing/alignment tools like BBMap/BBTools or FLASH. **To reiterate, simple read merging tools will not give you assembled contigs.**
  
  > **Comments:**
  > **username_0**: Thank you, this had helped a lot, I'm definitely struggling with some of the subtleties of data processing. My end goal is to do Taxonomic and Functional analysis in MEGAN, but I've been told that it's only designed to use R1 data. I thought I'd attempt to make the most of the sequencing data that I do have to get into a format suitable for MEGAN. Would using  MegaHit/metaSPAdes mean I wouldn't have to put my data through DIAMOND ?  I'm still very new to this and just making sure I have all the steps correct  
  > **username_4**: I am not sure what you mean by only R1 data. I don't think that assembly will make DIAMOND work any better, though it may be helpful for some MEGAN workflows. For examples of both assembled/raw shotgun data for MEGAN+DIAMOND, I'd suggest this ref: https://currentprotocols.onlinelibrary.wiley.com/doi/10.1002/cpz1.59  
  > **username_0**: Thank you, I'm still very much getting to grips with this.  I originally did 150 paired-end sequencing on my samples. I think DIAMOND/MEGAN only accepts a single input file (What I meant by only using Read1 data, I wasn't being clear there.) I thought trying to merge overlapping reads would give me longer DNA sequences for Taxonomic binning.  
  > **username_4**: @username_0 I'll first note as a tip for the future that having this intention stated in your question would make it a lot easier to understand what you need. I suppose that it's formally possible that read merging would improve things slightly, in practice I am not sure that it makes any difference. I would follow the example of the reference that I linked in my earlier comment, or really any other paper that uses DIAMOND and MEGAN, to understand what to do to preprocess data for those tools. Is there a reason why this won't work for you?  
  > **username_0**: I'll keep that in mind in the future thanks. I don't see any reason why it would work. What had me confused was when I mentioned my plans I was advised that FLASh wouldn't be suitable to generate contigs from my metagenome samples. I had planned to generate contigs from Read1 + Read2  and potentially cat on the output of the unmerged read by FLASh or align them separately and join them post assembly.   I wonder if when I mentioned it originally They thought I was intending to rely on it for contig generation and assembly.   Thank you again for your input it's been really helpful !  
  > **username_4**: @username_0  yeah, so I think that the source of the confusion is that merged reads aren't "contigs". Merged reads may represent "contiguous sequences" but the word "contig" has a [rather specific meaning](https://www.genome.gov/genetics-glossary/Contig) in genomics. I'm still not totally clear on the workflow here, but it seems like the issue is resolved at least.  
  
  ---
  
  