text: user294: Are there any suggested parameters to align ONT reads to the reference genome using STAR-long? For now, I used the parameters suggested here, but I noticed a weird behaviour. 
  I have RNA reads (D. melanogaster) from R7 and R9 flowcells, separately. I only selected to analyze 2D reads in pass category. 
  I have, respectively, 113249 reads for R7 and 40318 reads for R9. I aligned those reads and get (only!) 150 uniquely mapped reads for R7 data and 8017 uniquely mapped reads for R9 data. I tried to run again the same command on a different server with fresh compilation, but the output file is consistent with these 150 reads. 
  However, if I align the same with GMAP, I get 78016 uniquely mapped reads for R7 and 33523 uniquely mapped reads for R9, so I suspect that something went wrong in the alignment run. 
  I am aware that the two mappers behave very differently, STAR-long being  more precise and preferring to report mappings of fewer reads but at better loci, and GMAP being overall less precise, trying to map the most of the reads but at not-so-good loci. 
  I was wondering if some of you had experience with this and could suggest me the best parameters for RNA reads from ONT?
  
  user73: I've had great results using minimap2, particularly when combined with a pre-treatment of Canu for error correction (using minimap2 for the read-to-read mapping):
  # correct reads
  ~/install/canu/canu-1.6/Linux-amd64/bin/canu overlapper=minimap \
     genomeSize=100M minReadLength=100 minOverlapLength=30 -correct \
     -p 4T1_BC06 -d 4T1_BC06 \
     -nanopore-raw workspace/pass/barcode06/fastq_runid_*.fastq
  # align reads
  ~/install/minimap2/minimap2 -p 10 \
     -a ~/db/fasta/mmus/ucsc/mmus_ucsc_all_cdna.idx \
     -x splice <(pv all/4T1_BC06/4T1_BC06.correctedReads.fasta.gz) | \
    samtools sort > 4T1_BC06_all_vs_mmusAll.bam
  
  Update: the most recent nanopore basecaller, combined with the most recent minimap2, seems to now do a decent job with mapping, and pre-correction of reads no longer seems necessary. More recently I've been using LAST to map to the transcriptome, and minimap2 to map to the genome. Minimap2 has the ability to use a homopolymer-compressed genome index, which means that the most common consistent error for nanopore reads (i.e. misjudgement of homopolymer length) will not influence the mapping rate.
  
original_text: 294: <p>Are there any suggested parameters to align ONT reads to the reference genome using <a href="https://github.com/alexdobin/STAR/releases/tag/2.5.3a" rel="noreferrer">STAR-long</a>? For now, I used the parameters suggested <a href="https://github.com/PacificBiosciences/cDNA_primer/wiki/Bioinfx-study:-Optimizing-STAR-aligner-for-Iso-Seq-data#param" rel="noreferrer">here</a>, but I noticed a weird behaviour. </p>
  
  <p>I have RNA reads (<em>D. melanogaster</em>) from <code>R7</code> and <code>R9</code> flowcells, separately. I only selected to analyze <code>2D</code> reads in <code>pass</code> category. </p>
  
  <p>I have, respectively, 113249 reads for <code>R7</code> and 40318 reads for <code>R9</code>. I aligned those reads and get (only!) 150 uniquely mapped reads for <code>R7</code> data and 8017 uniquely mapped reads for <code>R9</code> data. I tried to run again the same command on a different server with fresh compilation, but the output file is consistent with these 150 reads. </p>
  
  <p>However, if I align the same with GMAP, I get 78016 uniquely mapped reads for <code>R7</code> and 33523 uniquely mapped reads for <code>R9</code>, so I suspect that something went wrong in the alignment run. </p>
  
  <p>I am aware that the two mappers behave very differently, STAR-long being  more precise and preferring to report mappings of fewer reads but at better loci, and GMAP being overall less precise, trying to map the most of the reads but at not-so-good loci. </p>
  
  <p>I was wondering if some of you had experience with this and could suggest me the best parameters for RNA reads from ONT?</p>
   73: <p>I've had great results using <a href="https://github.com/lh3/minimap2" rel="nofollow noreferrer">minimap2</a>, particularly when combined with a pre-treatment of Canu for error correction (using <em>minimap2</em> for the read-to-read mapping):</p>
  
  <pre><code># correct reads
  ~/install/canu/canu-1.6/Linux-amd64/bin/canu overlapper=minimap \
     genomeSize=100M minReadLength=100 minOverlapLength=30 -correct \
     -p 4T1_BC06 -d 4T1_BC06 \
     -nanopore-raw workspace/pass/barcode06/fastq_runid_*.fastq
  # align reads
  ~/install/minimap2/minimap2 -p 10 \
     -a ~/db/fasta/mmus/ucsc/mmus_ucsc_all_cdna.idx \
     -x splice &lt;(pv all/4T1_BC06/4T1_BC06.correctedReads.fasta.gz) | \
    samtools sort &gt; 4T1_BC06_all_vs_mmusAll.bam
  </code></pre>
  
  <p>Update: the most recent nanopore basecaller, combined with the most recent minimap2, seems to now do a decent job with mapping, and pre-correction of reads no longer seems necessary. More recently I've been using LAST to map to the transcriptome, and minimap2 to map to the genome. Minimap2 has the ability to use a homopolymer-compressed genome index, which means that the most common consistent error for nanopore reads (i.e. misjudgement of homopolymer length) will not influence the mapping rate.</p>
  