Answers.Body: <p>Do any of the answers for <a href="https://bioinformatics.stackexchange.com/questions/202/tools-for-simulating-oxford-nanopore-reads/222">this question</a> help? Karel Brinda has mentioned a few read simulators in <a href="https://bioinformatics.stackexchange.com/a/273/73">the answer to that question</a>, and has <a href="http://brinda.cz/publications/brinda_phd.pdf" rel="nofollow noreferrer">a thesis</a> with more information.</p>
  
  <p>Excluding INDEL errors doesn't sound like a good idea; length can still be preserved even if doing that, it just needs an adjustment at the end of the sequence. Note that if you're trying to model nanopore reads, what you're really modelling is the base-caller, rather than the sequencer. I mention this in more detail in <a href="https://bioinformatics.stackexchange.com/a/226/73">my answer</a>.</p>
  
  <p>In most cases where errors are modelled, I find it better to use publicly-available data instead. Especially for nanopore data, there are unmodelled systematic errors in the base-callers and sequencer that can't be simulated using any programs (because they are unmodelled). The following paper would be a good place to start for cDNA sequences, which looks at single-cell data from mouse (C57Bl/6) B1a cells:</p>
  
  <p><a href="http://www.biorxiv.org/content/early/2017/04/13/126847" rel="nofollow noreferrer">http://www.biorxiv.org/content/early/2017/04/13/126847</a></p>
  
  <p>Illumina and ONT reads for that study can be found in SRA under accession number <a href="https://trace.ncbi.nlm.nih.gov/Traces/sra/?study=SRP082530" rel="nofollow noreferrer">SRP082530</a>.</p>
  
  <p>I don't know of any recent <em>D. melanogaster</em> studies that have been done using nanopore. There's always the option of spending $1000 on a <a href="https://store.nanoporetech.com/minion/rna/sets" rel="nofollow noreferrer">purchase of a MinION</a> with an RNA starter kit to do the study yourself. Here's an older targeted gene study, but bear in mind that it was using an R7.3 flow cell, so errors rates will be much higher than what is currently available:</p>
  
  <p><a href="https://genomebiology.biomedcentral.com/articles/10.1186/s13059-015-0777-z" rel="nofollow noreferrer">https://genomebiology.biomedcentral.com/articles/10.1186/s13059-015-0777-z</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-22T19:43:37.373Z
Answers.LastActivityDate: 2017-08-22T19:52:49.440Z
Answers.LastEditDate: 2017-08-22T19:52:49.440Z
Answers.UserDisplayName: gringer
Answers.Body: <p><a href="http://www.biorxiv.org/content/early/2017/04/11/126656" rel="nofollow noreferrer">This preprint</a> uses pbsim to simulate ONT RNA-seq reads for fruit fly. It is probably worth reading if you want to do the same thing.</p>
  
  <p>You should include INDEL errors. Those are what make RNA-seq alignment challenging. For the benchmark purpose, adding INDELs does not increase the complexity at all. You can parse splice junctions on the reference from CIGAR and compare them to the annotation. You don't need to worry about the base-level alignment.</p>
  
  <p>In addition, there are <a href="https://www.nature.com/articles/ncomms16027" rel="nofollow noreferrer">public real ONT data</a> (AC:SRP082530) for <a href="https://www.lexogen.com/sirvs/" rel="nofollow noreferrer">SIRV spike-in control</a> and mouse B cells. You don't actually need simulation.</p>
  
  <p>PS: just noticed that you are an author of the first preprint I cited. I would use real data for evaluation.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-25T11:42:24.700Z
Answers.LastActivityDate: 2017-08-25T12:23:33.937Z
Answers.LastEditDate: 2017-08-25T12:23:33.937Z
Answers.UserDisplayName: user172818
Answers.Body: <p>The executable <code>fastq-sim</code> in <a href="http://cbrc3.cbrc.jp/~martin/dnemulator/README.html" rel="nofollow noreferrer">DNemulator</a> package is able to modify a set of input sequences in <code>fasta</code> format according to an external set of quality scores reported in a <code>fastq</code> file. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-24T13:36:56.130Z
Answers.LastActivityDate: 2017-08-24T13:36:56.130Z
Answers.UserDisplayName: aechchiki
Answers.Body: <p>It sounds like what you're really looking for is a read simulator. A cursory search turns up <a href="http://www.biorxiv.org/content/early/2016/03/18/044545" rel="nofollow noreferrer">NanoSim</a>, which is designed to simulate reads from a MinION. This has the benefit of at least having been <a href="https://gigascience.biomedcentral.com/articles/10.1186/s13742-016-0140-7" rel="nofollow noreferrer">used in some of the published literature</a>, which is always a nice sign.</p>
  
  <p>You may also find <a href="http://www.nature.com/nrg/journal/v17/n8/full/nrg.2016.57.html" rel="nofollow noreferrer">this review article</a> on read simulators useful. It doesn't specifically mention NanoSim, but it should prove to be a useful review of the general concepts anyway if you need to read up on them.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-22T17:47:33.240Z
Answers.Text: Hum, not really what I am looking for because `the simulation tool uses the model built in the previous step to produce in silico reads for a given reference genome` - and the thing I need is to first, compute the error rate from the experimental reads (can be done parsing an alignment file in sam), and second, substitute in the reference as many nucleotides as needed to reach the average error rate of real ONT reads. for NanoSim I have the impression they are generating totally denovo 'reads' from the genome directly.
Answers.UserDisplayName: aechchiki
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-22T17:55:44.983Z
Answers.Text: @AminaEchchiki If you don't want to use one of their pre-trained models, then you can have it train on real data and then it'll output reads with the appropriate error profile. Of course, since it uses LAST then whatever is most similar will have the best performance in your benchmarks.
Answers.UserDisplayName: Devon Ryan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-22T17:39:19.703Z
Answers.LastActivityDate: 2017-08-22T17:39:19.703Z
Answers.UserDisplayName: Devon Ryan
Body: <p>I would like to modify some reference transcripts from Ensembl (<em>D. melanogaster</em>) to introduce a controlled rate of random errors in the sequences. The idea would be to introduce random base substitutions in these sequences, no indels for now, because I would like to keep the transcript sequence length as it is in the reference. </p>
  
  <p>The rate of error per transcript will be determined according to an error profile computed from an external set of RNA-seq reads (e.g., generated with ONT MinION)</p>
  
  <p>The aim of this modification would be to establish a rough benchmark of the performances of aligners to use over transcripts from spliced reads (rna-to-genome), aka with more than one exon.</p>
  
  <p>Any idea of which software would be best for this purpose?</p>
  
Tags: <rna-seq><software-recommendation><nanopore><simulated-data>
Title: Introduce errors in reference transcripts according to external dataset error model
ThreadText: # Introduce errors in reference transcripts according to external dataset error model
  
  (Asked by: username_0 on 2017-08-22)
  
  I would like to modify some reference transcripts from Ensembl (*D. melanogaster*) to introduce a controlled rate of random errors in the sequences. The idea would be to introduce random base substitutions in these sequences, no indels for now, because I would like to keep the transcript sequence length as it is in the reference.
  
  The rate of error per transcript will be determined according to an error profile computed from an external set of RNA-seq reads (e.g., generated with ONT MinION)
  
  The aim of this modification would be to establish a rough benchmark of the performances of aligners to use over transcripts from spliced reads (rna-to-genome), aka with more than one exon.
  
  Any idea of which software would be best for this purpose?
  
  **Tags:** rna-seq, software-recommendation, nanopore, simulated-data
  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_1 on 2017-08-22. Score: 3 | Accepted answer
  
  Do any of the answers for [this question](https://bioinformatics.stackexchange.com/questions/202/tools-for-simulating-oxford-nanopore-reads/222) help? Karel Brinda has mentioned a few read simulators in [the answer to that question](https://bioinformatics.stackexchange.com/a/273/73), and has [a thesis](http://brinda.cz/publications/brinda_phd.pdf) with more information.
  
  Excluding INDEL errors doesn't sound like a good idea; length can still be preserved even if doing that, it just needs an adjustment at the end of the sequence. Note that if you're trying to model nanopore reads, what you're really modelling is the base-caller, rather than the sequencer. I mention this in more detail in [my answer](https://bioinformatics.stackexchange.com/a/226/73).
  
  In most cases where errors are modelled, I find it better to use publicly-available data instead. Especially for nanopore data, there are unmodelled systematic errors in the base-callers and sequencer that can't be simulated using any programs (because they are unmodelled). The following paper would be a good place to start for cDNA sequences, which looks at single-cell data from mouse (C57Bl/6) B1a cells:
  
  <http://www.biorxiv.org/content/early/2017/04/13/126847>
  
  Illumina and ONT reads for that study can be found in SRA under accession number [SRP082530](https://trace.ncbi.nlm.nih.gov/Traces/sra/?study=SRP082530).
  
  I don't know of any recent *D. melanogaster* studies that have been done using nanopore. There's always the option of spending $1000 on a [purchase of a MinION](https://store.nanoporetech.com/minion/rna/sets) with an RNA starter kit to do the study yourself. Here's an older targeted gene study, but bear in mind that it was using an R7.3 flow cell, so errors rates will be much higher than what is currently available:
  
  <https://genomebiology.biomedcentral.com/articles/10.1186/s13059-015-0777-z>
  
  
  ---
  
  ### Answer by username_2 on 2017-08-25. Score: 3
  
  [This preprint](http://www.biorxiv.org/content/early/2017/04/11/126656) uses pbsim to simulate ONT RNA-seq reads for fruit fly. It is probably worth reading if you want to do the same thing.
  
  You should include INDEL errors. Those are what make RNA-seq alignment challenging. For the benchmark purpose, adding INDELs does not increase the complexity at all. You can parse splice junctions on the reference from CIGAR and compare them to the annotation. You don't need to worry about the base-level alignment.
  
  In addition, there are [public real ONT data](https://www.nature.com/articles/ncomms16027) (AC:SRP082530) for [SIRV spike-in control](https://www.lexogen.com/sirvs/) and mouse B cells. You don't actually need simulation.
  
  PS: just noticed that you are an author of the first preprint I cited. I would use real data for evaluation.
  
  
  ---
  
  ### Answer by username_0 on 2017-08-24. Score: 1
  
  The executable `fastq-sim` in [DNemulator](http://cbrc3.cbrc.jp/~martin/dnemulator/README.html) package is able to modify a set of input sequences in `fasta` format according to an external set of quality scores reported in a `fastq` file.
  
  
  ---
  
  ### Answer by username_3 on 2017-08-22. Score: 1
  
  It sounds like what you're really looking for is a read simulator. A cursory search turns up [NanoSim](http://www.biorxiv.org/content/early/2016/03/18/044545), which is designed to simulate reads from a MinION. This has the benefit of at least having been [used in some of the published literature](https://gigascience.biomedcentral.com/articles/10.1186/s13742-016-0140-7), which is always a nice sign.
  
  You may also find [this review article](http://www.nature.com/nrg/journal/v17/n8/full/nrg.2016.57.html) on read simulators useful. It doesn't specifically mention NanoSim, but it should prove to be a useful review of the general concepts anyway if you need to read up on them.
  
  > **Comments:**
  > **username_0**: Hum, not really what I am looking for because `the simulation tool uses the model built in the previous step to produce in silico reads for a given reference genome` - and the thing I need is to first, compute the error rate from the experimental reads (can be done parsing an alignment file in sam), and second, substitute in the reference as many nucleotides as needed to reach the average error rate of real ONT reads. for NanoSim I have the impression they are generating totally denovo 'reads' from the genome directly.  
  > **username_3**: @AminaEchchiki If you don't want to use one of their pre-trained models, then you can have it train on real data and then it'll output reads with the appropriate error profile. Of course, since it uses LAST then whatever is most similar will have the best performance in your benchmarks.  
  
  ---
  
  