3
$\begingroup$

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?

$\endgroup$

2 Answers 2

2
$\begingroup$

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?

$\endgroup$
1
  • $\begingroup$ They aren't really reads per se - just short sequences from another application that I need to align. Thanks for your comments. $\endgroup$
    – conchoecia
    Commented Aug 21, 2018 at 21:32
3
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.