Answers.Body: <p>Minimap2 is not the most optimal aligner in this case, it was designed for long reads, of which 32bp reads are clearly not. You could try lowering the  mnimizer k-mer length and with <code>-k</code> the default being 15, also try lowering the minimzer window size with <code>-w</code>.  However I suggest using <code>bwa aln</code> and <code>bwa samse</code> for all reads under 32bp and then merging the alignment later. Although I struggle to see what the utility of these short reads will be against a backdrop of longer reads?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-21T21:32:07.803Z
Answers.Text: They aren't really reads per se - just short sequences from another application that I need to align. Thanks for your comments.
Answers.UserDisplayName: conchoecia
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-20T10:56:03.633Z
Answers.LastActivityDate: 2018-08-20T11:02:40.347Z
Answers.LastEditDate: 2018-08-20T11:02:40.347Z
Answers.UserDisplayName: Matt Bashton
Answers.Body: <p>Minimap2 doesn't work well with 32bp reads by design. Older mappers like bowtie1 and bwa-aln will be better.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-20T11:48:57.550Z
Answers.LastActivityDate: 2018-08-20T11:48:57.550Z
Answers.UserDisplayName: user172818
Body: <p>I mapped fasta sequences to a reference. The fasta sequences range in length from 17bp up to several hundred bp. I used <code>minimap2</code> with the following command: <code>minimap2 -ax sr ref.fa seqs.fa</code>, et cetera. Only the sequences greater than 32bp len mapped though.</p>
  
  <pre><code>samtools view -F 4 filename.sorted.bam | \
    cut -f10 | awk '{print length($1)}' | \
    sort | uniq -c | sort -k2 -n
  
     2304 32
    34931 33
     5443 34
     5343 35
     8811 36
     5485 37
     5417 38
  </code></pre>
  
  <p>Is it possible to make minimap2 map sequences shorter than 32bp? Do I need to use <code>bwa aln</code> or some other mapper?</p>
  
Tags: <fasta><read-mapping><phylogenetics><bwa><minimap2>
Title: How to map reads shorter than 32bp with minimap2?
ThreadText: # How to map reads shorter than 32bp with minimap2?
  
  (Asked by: username_0 on 2018-08-17)
  
  I mapped fasta sequences to a reference. The fasta sequences range in length from 17bp up to several hundred bp. I used `minimap2` with the following command: `minimap2 -ax sr ref.fa seqs.fa`, et cetera. Only the sequences greater than 32bp len mapped though.
  
  ```
  samtools view -F 4 filename.sorted.bam | \
    cut -f10 | awk '{print length($1)}' | \
    sort | uniq -c | sort -k2 -n
  
     2304 32
    34931 33
     5443 34
     5343 35
     8811 36
     5485 37
     5417 38
  
  ```
  
  Is it possible to make minimap2 map sequences shorter than 32bp? Do I need to use `bwa aln` or some other mapper?
  
  **Tags:** fasta, read-mapping, phylogenetics, bwa, minimap2
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-08-20. Score: 2 | Accepted answer
  
  Minimap2 is not the most optimal aligner in this case, it was designed for long reads, of which 32bp reads are clearly not. You could try lowering the mnimizer k-mer length and with `-k` the default being 15, also try lowering the minimzer window size with `-w`. However I suggest using `bwa aln` and `bwa samse` for all reads under 32bp and then merging the alignment later. Although I struggle to see what the utility of these short reads will be against a backdrop of longer reads?
  
  > **Comments:**
  > **username_0**: They aren't really reads per se - just short sequences from another application that I need to align. Thanks for your comments.  
  
  ---
  
  ### Answer by username_2 on 2018-08-20. Score: 3
  
  Minimap2 doesn't work well with 32bp reads by design. Older mappers like bowtie1 and bwa-aln will be better.
  
  
  ---
  
  