<blockquote>
<p>I could use NanoSim, but that tool seems to be very difficult to use. I only have a reference genome, but you need training data as well?</p>
</blockquote>
<p>Karel Břinda's fork, <a href="https://github.com/karel-brinda/NanoSim-H" rel="nofollow noreferrer">NanoSim-H</a>, ships with pretrained models (or &quot;error profiles&quot;, as they're called there), eliminating the need for training data.</p>
<p>Minimal usage instructions to run with the default error model (trained on 1D² reads of E. Coli on an R9 flowcell):</p>
<pre><code>pip install nanosim-h
nanosim-h your-reference.fasta
</code></pre>

CC BY-SA 4.0
2019-07-14T23:34:48.100Z
2022-09-03T18:38:59.377Z
2022-09-03T18:38:59.377Z
Mark Amery
<p>It is important to train an error model as NanoSim does, as we do not fully understand the error processes involved in both the nanopore sequencing process and the basecalling process. Any sort of read simulator that does not use a species-specific model is just not going to produce realistic simulated reads.</p>

<p>As far as datasets go, <a href="https://www.nature.com/articles/s41467-018-03016-2#Sec9" rel="noreferrer">I would recommend looking at this assembly</a> and the <a href="https://www.ebi.ac.uk/ena/data/view/PRJEB21270" rel="noreferrer">associated data uploaded on EMBL:</a></p>

<blockquote>
  <p>Michael, Todd P., et al. "High contiguity Arabidopsis thaliana
  genome assembly with a single nanopore flow cell." Nature
  communications 9.1 (2018): 541.</p>
</blockquote>

<p>There are several data types there, as well as an assembly to train the models on.</p>

<h2>Is it OK to train a model using reads from one individual and a reference assembly from another individual?</h2>

<p>Generally, it is not good to map reads from one individual to the reference genome of another individual since this introduces something called <a href="https://www.sevenbridges.com/reference-bias-challenges-and-solutions/" rel="noreferrer">reference bias.</a> When we align reads to a reference genome generated from the same reads, or just from other reads from the same individual we remove this problem. All true reads will map to correctly assembled parts of the genome.</p>

<h2>Why can we train a model for nanopore reads on a reference generated from ... nanopore reads? Won't we get a bad model for indels?</h2>

<p>Yes, well, maybe. If the reference genome has been corrected to remove indels using a tool like <a href="https://github.com/broadinstitute/pilon" rel="noreferrer">pilon</a>, then you can generally presume that the reference genome has very few to no indels present as a result of sequencing error from the Nanopore/PacBio reads. As a result, the model derived from aligning reads should have the correct error profile for indels.</p>

<p>Again, it is important that the long-read-assembly was corrected with Illumina shotgun reads from the same individual from which the long reads were derived. Otherwise the corrected reference would have a chimaera of indels and SNPs from multiple individuals.</p>

CC BY-SA 4.0
2018-10-23T08:01:29.353Z
so to get it more clear, I should use the MinION " FASTQ files (FTP)", convert this to .fasta and use this to get a training folder using ./read_analysis.py with -r as the Arabidopsis reference genome (where should i find that?). Then use "./simulator.py" and use -c to that folder and -r to get the reads from. Does it matter that the reference I want reads from is different (in size and probably sequence) from the MinION data that I use? (as long as they are similar i guess?)
Fini
CC BY-SA 4.0
2018-10-23T08:06:21.457Z
Yes, you would just use the basecalled fastq/fasta data and use the reference from the same dataset to align and make the model. I have updated my question above to address using reference/data from different individuals. I'm not sure of the exact commands to run but it sounds like you have the right idea. When navigating EMBL, there are a few levels of organization. Above, I linked to the project - the highest level in the hierarchy. Clicking on the "naviagation" tab reveals the other pages for the project including the assembly: https://www.ebi.ac.uk/ena/data/view/GCA_900303355
conchoecia
CC BY-SA 4.0
2018-10-23T08:13:01.730Z
Thanks for the clarification. So to recap (sorry I am fairly new to this kind of data). Reference Arabidopsis =  "WGS_SET_FASTA" from the assembly link.
Basecalled fastq files Arabidopsis = MinION "FASTQ files (FTP)" from the Read Files tab. Use these two to get the training folder.
Sequence to produce reads from: My own .fasta file (also Arabidopsis, but slightly different from the ones mentioned above)
Fini
CC BY-SA 4.0
2018-10-23T08:14:43.087Z
Sorry, the question just updated, i have a look
Fini
CC BY-SA 4.0
2018-10-23T08:17:45.140Z
nanopore fastq (FASTQ files FTP): https://www.ebi.ac.uk/ena/data/view/ERR2173373  ... Sequel fastq (FASTQ files FTP) https://www.ebi.ac.uk/ena/data/view/ERR2173371  ... reference (WGS_SET_FASTA) https://www.ebi.ac.uk/ena/data/view/GCA_900303355 . Yep - you have the right idea w/r/t how to use all of the files.
conchoecia
CC BY-SA 4.0
2018-10-23T08:20:24.503Z
Thanks, I have a try tomorrow. I hope someone will be able to help then if something is not working after experimenting with the program first myself. But I am much further than I was before. Thanks!
Fini
CC BY-SA 4.0
2018-10-30T07:33:44.570Z
So I wanted to come back to this issue, so it could help others in the future. So these files worked, although I had many troubles working with the large dataset. Just keep in mind to reduce the dataset in some way or have a computer with high memory availability (32 gig was not enough at least).
Fini
CC BY-SA 4.0
2018-10-23T07:52:47.003Z
2018-10-23T08:14:01.313Z
2018-10-23T08:14:01.313Z
conchoecia
<p>I have looked already here: <a href="https://bioinformatics.stackexchange.com/questions/202/tools-for-simulating-oxford-nanopore-reads">Tools for simulating Oxford Nanopore reads</a>
. This doesn't answer my question, because it lists a few Nanopore read simulators, but I have specific problems with each of them.</p>

<p>I am trying to simulate some Nanopore reads. I could use NanoSim, but that tool seems to be very difficult to use. I only have a reference genome, but you need training data as well? anyone have any experience with this? I can only find bacterial and yeast data (and I want to try this on <em>Arabidopsis thaliana</em> reference)</p>

<p>Another promising tool I found, was a paper for SNaReSim, reference here:
<a href="https://ieeexplore.ieee.org/document/8031171" rel="nofollow noreferrer">https://ieeexplore.ieee.org/document/8031171</a>. However I cannot seem to find the tool itself, which is also mentioned in the other stackexchange post I mentioned above. </p>

<p>Does anyone have experience simulating PacBio reads with NanoSim, SNaReSim or maybe another tool? Because I am not sure about which one to use. Others like <a href="https://github.com/ethanagbaker/SiLiCO" rel="nofollow noreferrer" title="SiLiCO">SiLiCO</a> or <a href="https://sourceforge.net/projects/readsim/" rel="nofollow noreferrer" title="ReadSim">ReadSim</a> were updated 2 years ago and I believe that Nanopore technology has improved a lot in that time.</p>

<p>To clarify a bit on why I want to simulate data: I just want to test several tools about SV calling and simulating for a school project. All of the points mentioned in the comments I will use for the discussion, but I wanted to focus on 1 read simulator per technology and didn't know what to use, because Nanopore is difficult to simulate in that sense. That was already known to me.</p>

CC BY-SA 4.0
2018-10-23T09:10:28.937Z
Why do you need to simulate reads? There are plenty of existing public datasets for [human gDNA](https://github.com/nanopore-wgs-consortium/NA12878/blob/master/Genome.md), [parasite gDNA](https://doi.org/10.1186/s12915-017-0473-4), [human RNA](https://github.com/nanopore-wgs-consortium/NA12878/blob/master/RNA.md), [human cDNA](https://github.com/nanopore-wgs-consortium/NA12878/blob/master/RNA.md), [E. coli gDNA](http://dx.doi.org/10.12688/f1000research.11354.1), and I've uploaded a couple of [mouse cDNA](https://doi.org/10.5281/zenodo.1244087) [runs](https://doi.org/10.5281/zenodo.1419086).
gringer
CC BY-SA 4.0
2018-10-23T11:23:36.340Z
because I want to test some SV callers, and for that I need to know exactly where my SVs are, and for that I need simulated reads that contain my known SVs
Fini
CC BY-SA 4.0
2018-10-23T15:12:24.927Z
@Fini, please [edit] the question to include your last comment,  and perhaps more information, the answers might change/improve with it.
llrs
CC BY-SA 4.0
2018-10-23T21:22:41.427Z
Yes, you need to know where the SVs are, but simulated reads are not necessary for that. It's much better to use annotated true data (as suggested in [conchoecia's answer](https://bioinformatics.stackexchange.com/a/5260/73)), because it's not possible to know all the variation in DNA that can contribute to base caller error. This is a particular issue with nanopore data, because the underlying sequencer model (current change caused by DNA moving through a pore) is very complex.
gringer
CC BY-SA 4.0
2018-10-24T07:15:28.173Z
I added some lines to the question to clarify. I can use this information in my discussion. Do you possibly have a paper that claims the same thing or is this just based on your own knowledge?
Fini
<nanopore><long-reads><simulated-data>
How to simulate nanopore reads?
# How to simulate nanopore reads?

(Asked by: username_0 on 2018-10-23)

I have looked already here: [Tools for simulating Oxford Nanopore reads](https://bioinformatics.stackexchange.com/questions/202/tools-for-simulating-oxford-nanopore-reads)
. This doesn't answer my question, because it lists a few Nanopore read simulators, but I have specific problems with each of them.

I am trying to simulate some Nanopore reads. I could use NanoSim, but that tool seems to be very difficult to use. I only have a reference genome, but you need training data as well? anyone have any experience with this? I can only find bacterial and yeast data (and I want to try this on *Arabidopsis thaliana* reference)

Another promising tool I found, was a paper for SNaReSim, reference here:
<https://ieeexplore.ieee.org/document/8031171>. However I cannot seem to find the tool itself, which is also mentioned in the other stackexchange post I mentioned above.

Does anyone have experience simulating PacBio reads with NanoSim, SNaReSim or maybe another tool? Because I am not sure about which one to use. Others like [SiLiCO](https://github.com/ethanagbaker/SiLiCO "SiLiCO") or [ReadSim](https://sourceforge.net/projects/readsim/ "ReadSim") were updated 2 years ago and I believe that Nanopore technology has improved a lot in that time.

To clarify a bit on why I want to simulate data: I just want to test several tools about SV calling and simulating for a school project. All of the points mentioned in the comments I will use for the discussion, but I wanted to focus on 1 read simulator per technology and didn't know what to use, because Nanopore is difficult to simulate in that sense. That was already known to me.

**Tags:** nanopore, long-reads, simulated-data
> **Comments:**
> **username_1**: Why do you need to simulate reads? There are plenty of existing public datasets for [human gDNA](https://github.com/nanopore-wgs-consortium/NA12878/blob/master/Genome.md), [parasite gDNA](https://doi.org/10.1186/s12915-017-0473-4), [human RNA](https://github.com/nanopore-wgs-consortium/NA12878/blob/master/RNA.md), [human cDNA](https://github.com/nanopore-wgs-consortium/NA12878/blob/master/RNA.md), [E. coli gDNA](http://dx.doi.org/10.12688/f1000research.11354.1), and I've uploaded a couple of [mouse cDNA](https://doi.org/10.5281/zenodo.1244087) [runs](https://doi.org/10.5281/zenodo.1419086).  
> **username_0**: because I want to test some SV callers, and for that I need to know exactly where my SVs are, and for that I need simulated reads that contain my known SVs  
> **username_2**: @Fini, please [edit] the question to include your last comment,  and perhaps more information, the answers might change/improve with it.  
> **username_1**: Yes, you need to know where the SVs are, but simulated reads are not necessary for that. It's much better to use annotated true data (as suggested in [conchoecia's answer](https://bioinformatics.stackexchange.com/a/5260/73)), because it's not possible to know all the variation in DNA that can contribute to base caller error. This is a particular issue with nanopore data, because the underlying sequencer model (current change caused by DNA moving through a pore) is very complex.  
> **username_0**: I added some lines to the question to clarify. I can use this information in my discussion. Do you possibly have a paper that claims the same thing or is this just based on your own knowledge?  

---

## 2 answers

### Answer by username_4 on 2018-10-23. Score: 5 | Accepted answer

It is important to train an error model as NanoSim does, as we do not fully understand the error processes involved in both the nanopore sequencing process and the basecalling process. Any sort of read simulator that does not use a species-specific model is just not going to produce realistic simulated reads.

As far as datasets go, [I would recommend looking at this assembly](https://www.nature.com/articles/s41467-018-03016-2#Sec9) and the [associated data uploaded on EMBL:](https://www.ebi.ac.uk/ena/data/view/PRJEB21270)

> Michael, Todd P., et al. "High contiguity Arabidopsis thaliana
> genome assembly with a single nanopore flow cell." Nature
> communications 9.1 (2018): 541.

There are several data types there, as well as an assembly to train the models on.

## Is it OK to train a model using reads from one individual and a reference assembly from another individual?

Generally, it is not good to map reads from one individual to the reference genome of another individual since this introduces something called [reference bias.](https://www.sevenbridges.com/reference-bias-challenges-and-solutions/) When we align reads to a reference genome generated from the same reads, or just from other reads from the same individual we remove this problem. All true reads will map to correctly assembled parts of the genome.

## Why can we train a model for nanopore reads on a reference generated from ... nanopore reads? Won't we get a bad model for indels?

Yes, well, maybe. If the reference genome has been corrected to remove indels using a tool like [pilon](https://github.com/broadinstitute/pilon), then you can generally presume that the reference genome has very few to no indels present as a result of sequencing error from the Nanopore/PacBio reads. As a result, the model derived from aligning reads should have the correct error profile for indels.

Again, it is important that the long-read-assembly was corrected with Illumina shotgun reads from the same individual from which the long reads were derived. Otherwise the corrected reference would have a chimaera of indels and SNPs from multiple individuals.

> **Comments:**
> **username_0**: so to get it more clear, I should use the MinION " FASTQ files (FTP)", convert this to .fasta and use this to get a training folder using ./read_analysis.py with -r as the Arabidopsis reference genome (where should i find that?). Then use "./simulator.py" and use -c to that folder and -r to get the reads from. Does it matter that the reference I want reads from is different (in size and probably sequence) from the MinION data that I use? (as long as they are similar i guess?)  
> **username_4**: Yes, you would just use the basecalled fastq/fasta data and use the reference from the same dataset to align and make the model. I have updated my question above to address using reference/data from different individuals. I'm not sure of the exact commands to run but it sounds like you have the right idea. When navigating EMBL, there are a few levels of organization. Above, I linked to the project - the highest level in the hierarchy. Clicking on the "naviagation" tab reveals the other pages for the project including the assembly: https://www.ebi.ac.uk/ena/data/view/GCA_900303355  
> **username_0**: Thanks for the clarification. So to recap (sorry I am fairly new to this kind of data). Reference Arabidopsis =  "WGS_SET_FASTA" from the assembly link. Basecalled fastq files Arabidopsis = MinION "FASTQ files (FTP)" from the Read Files tab. Use these two to get the training folder. Sequence to produce reads from: My own .fasta file (also Arabidopsis, but slightly different from the ones mentioned above)  
> **username_0**: Sorry, the question just updated, i have a look  
> **username_4**: nanopore fastq (FASTQ files FTP): https://www.ebi.ac.uk/ena/data/view/ERR2173373  ... Sequel fastq (FASTQ files FTP) https://www.ebi.ac.uk/ena/data/view/ERR2173371  ... reference (WGS_SET_FASTA) https://www.ebi.ac.uk/ena/data/view/GCA_900303355 . Yep - you have the right idea w/r/t how to use all of the files.  
> **username_0**: Thanks, I have a try tomorrow. I hope someone will be able to help then if something is not working after experimenting with the program first myself. But I am much further than I was before. Thanks!  
> **username_0**: So I wanted to come back to this issue, so it could help others in the future. So these files worked, although I had many troubles working with the large dataset. Just keep in mind to reduce the dataset in some way or have a computer with high memory availability (32 gig was not enough at least).  

---

### Answer by username_3 on 2019-07-14. Score: 3

I could use NanoSim, but that tool seems to be very difficult to use. I only have a reference genome, but you need training data as well?

Karel Břinda's fork, NanoSim-H, ships with pretrained models (or "error profiles", as they're called there), eliminating the need for training data.
Minimal usage instructions to run with the default error model (trained on 1D² reads of E. Coli on an R9 flowcell):
pip install nanosim-h
nanosim-h your-reference.fasta


---

