Answers.Body: <p>Even though ococo does not seem to handle big indels well, it's a good enough tool for a first try.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-09T09:53:30.650Z
Answers.LastActivityDate: 2018-01-09T09:53:30.650Z
Answers.UserDisplayName: 719016
Answers.Body: <p>You should be able to use something like <a href="https://github.com/broadinstitute/pilon/releases" rel="nofollow noreferrer">Pilon</a> to convert from one genome to another, assuming the changes are all fairly small local changes (but that's almost never the case).</p>
  
  <p>I find your resistance to long-read data interesting. It's important to consider the cost of bioinformatics as well. Sequencing a phage genome with long reads will take less than an hour, and probably produce a few reads that cover the entire genome. With existing short-read data, those full-length reads should be able to be fixed up within a day.</p>
  
  <p>I spent about half a year trying to fix a eukaryotic genome assembly that was assembled only from short reads (using Pilon, and <a href="http://www.fishbrowser.org/software/L_RNA_scaffolder/" rel="nofollow noreferrer">L-RNA-scaffolder</a>), and I was only able to reduce the number of contigs down by about half (and even at that, I wasn't convinced that contigs were being properly joined). With long reads and another couple of weeks of computer work, the contigs dropped down to about a tenth of their original number.</p>
  
  <p>If you can use a pipette and have about half an hour spare, you can do rapid long-read sequencing on the MinION.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-09T18:42:52.043Z
Answers.LastActivityDate: 2018-01-09T18:42:52.043Z
Answers.UserDisplayName: gringer
Body: <p>This question is slightly related to this one:
  <a href="https://bioinformatics.stackexchange.com/questions/97/improve-a-reference-genome-with-sequencing-data">Improve a reference genome with sequencing data</a></p>
  
  <p>Only in my case, I have a starting genome reference A, of a short phage genome, and reads from a related genome B, for which I haven't been able to find a reference.</p>
  
  <p>I took the Illumina 2x75bp paired end reads from genome B and ran Velvet on it (I ran Ray, but it didn't complete). It gives me a fragmented collection of contigs. The contigs align 99-98% to reference genome A. I don't have long reads.</p>
  
  <p>My question is: with the short reads and the contigs that I have, can I transform the reference genome A into a reference genome B?</p>
  
  <p>PS: no, I don't have long reads, and there is no budget for them. The budget for long reads is zero and will remain zero. Even if we could sequence long reads for free, we would still not do it because of the lab work.</p>
  
  <p>Tools that I have tried so far:</p>
  
  <p>ococo:</p>
  
  <pre><code>$HOME/ococo/ococo -i contigs.bwamem.bam -c 1 -f $HOME/Genomes/T2_phage/starting.fasta -F consensus.fasta --vcf-cons - -V variants.vcf
  </code></pre>
  
  <p>It produced a consensus.fasta, and checking how much it changes from the reference, it changes. There are one or more changes in about 33% of the 100bp windows:</p>
  
  <pre><code>diff -y &lt;(seqtk seq -l 100 $HOME/Genomes/T2_phage/starting.fasta) &lt;(seqtk seq -l 100 consensus.fasta) | grep '\ \|\ ' | wc -l
  1272
  diff -y &lt;(seqtk seq -l 100 $HOME/Genomes/T2_phage/starting.fasta) &lt;(seqtk seq -l 100 consensus.fasta) | grep -v '\ \|\ ' | wc -l
  419
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-24T15:10:44.480Z
Comments.Text: What is the insert size distrobution on the 2x75 library? Based on the alignments what is the coverage of the reference A genome?  How does the N50 of the velvet assembly compare with the reference A genome size?
Comments.UserDisplayName: Bioathlete
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-25T09:07:48.810Z
Comments.Text: The size distribution is 250bp. The alignment coverage is about 200-250x. The genome size of the starting genome is about 157kb, the two longest contigs were about 2-2.5kb.
Comments.UserDisplayName: 719016
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-11-05T21:35:25.917Z
Comments.Text: Why aren't you using the solution to the question you linked to? It seems very similar to your situation. (If you describe the difference explicitly, it might help you get better answers on this thread.)
Comments.UserDisplayName: eric_kernfeld
Tags: <sam><reference-genome><snp>
Title: Creating a new reference genome B by changing genome A with mismatches from BAM file without long reads
ThreadText: # Creating a new reference genome B by changing genome A with mismatches from BAM file without long reads
  
  (Asked by: username_0 on 2017-10-24)
  
  This question is slightly related to this one:
  [Improve a reference genome with sequencing data](https://bioinformatics.stackexchange.com/questions/97/improve-a-reference-genome-with-sequencing-data)
  
  Only in my case, I have a starting genome reference A, of a short phage genome, and reads from a related genome B, for which I haven't been able to find a reference.
  
  I took the Illumina 2x75bp paired end reads from genome B and ran Velvet on it (I ran Ray, but it didn't complete). It gives me a fragmented collection of contigs. The contigs align 99-98% to reference genome A. I don't have long reads.
  
  My question is: with the short reads and the contigs that I have, can I transform the reference genome A into a reference genome B?
  
  PS: no, I don't have long reads, and there is no budget for them. The budget for long reads is zero and will remain zero. Even if we could sequence long reads for free, we would still not do it because of the lab work.
  
  Tools that I have tried so far:
  
  ococo:
  
  ```
  $HOME/ococo/ococo -i contigs.bwamem.bam -c 1 -f $HOME/Genomes/T2_phage/starting.fasta -F consensus.fasta --vcf-cons - -V variants.vcf
  
  ```
  
  It produced a consensus.fasta, and checking how much it changes from the reference, it changes. There are one or more changes in about 33% of the 100bp windows:
  
  ```
  diff -y <(seqtk seq -l 100 $HOME/Genomes/T2_phage/starting.fasta) <(seqtk seq -l 100 consensus.fasta) | grep '\ \|\ ' | wc -l
  1272
  diff -y <(seqtk seq -l 100 $HOME/Genomes/T2_phage/starting.fasta) <(seqtk seq -l 100 consensus.fasta) | grep -v '\ \|\ ' | wc -l
  419
  
  ```
  
  **Tags:** sam, reference-genome, snp
  
  > **Comments:**
  > **username_1**: What is the insert size distrobution on the 2x75 library? Based on the alignments what is the coverage of the reference A genome?  How does the N50 of the velvet assembly compare with the reference A genome size?  
  > **username_0**: The size distribution is 250bp. The alignment coverage is about 200-250x. The genome size of the starting genome is about 157kb, the two longest contigs were about 2-2.5kb.  
  > **username_2**: Why aren't you using the solution to the question you linked to? It seems very similar to your situation. (If you describe the difference explicitly, it might help you get better answers on this thread.)  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2018-01-09. Score: 0 | Accepted answer
  
  Even though ococo does not seem to handle big indels well, it's a good enough tool for a first try.
  
  
  ---
  
  ### Answer by username_3 on 2018-01-09. Score: 2
  
  You should be able to use something like [Pilon](https://github.com/broadinstitute/pilon/releases) to convert from one genome to another, assuming the changes are all fairly small local changes (but that's almost never the case).
  
  I find your resistance to long-read data interesting. It's important to consider the cost of bioinformatics as well. Sequencing a phage genome with long reads will take less than an hour, and probably produce a few reads that cover the entire genome. With existing short-read data, those full-length reads should be able to be fixed up within a day.
  
  I spent about half a year trying to fix a eukaryotic genome assembly that was assembled only from short reads (using Pilon, and [L-RNA-scaffolder](http://www.fishbrowser.org/software/L_RNA_scaffolder/)), and I was only able to reduce the number of contigs down by about half (and even at that, I wasn't convinced that contigs were being properly joined). With long reads and another couple of weeks of computer work, the contigs dropped down to about a tenth of their original number.
  
  If you can use a pipette and have about half an hour spare, you can do rapid long-read sequencing on the MinION.
  
  
  ---
  
  