text: user2085: 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?
  
  user1769: 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?
  
  user37: Minimap2 doesn't work well with 32bp reads by design. Older mappers like bowtie1 and bwa-aln will be better.
  
original_text: 2085: <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>
   1769: <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>
   37: <p>Minimap2 doesn't work well with 32bp reads by design. Older mappers like bowtie1 and bwa-aln will be better.</p>
  