3

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?

conchoecia
  • 3,141
  • 2
  • 16
  • 40

2 Answers2

3

Minimap2 doesn't work well with 32bp reads by design. Older mappers like bowtie1 and bwa-aln will be better.

user172818
  • 6,515
  • 2
  • 13
  • 29
2

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?

Matt Bashton
  • 1,069
  • 6
  • 16
  • They aren't really reads per se - just short sequences from another application that I need to align. Thanks for your comments. – conchoecia Aug 21 '18 at 21:32