Question: Minimap2 giving 2 TB sam file as an output
0
gravatar for Inquisitive8995
10 months ago by
Inquisitive8995170 wrote:

Hello,

I have been trying to run Minimap2 with fasta files of ~200Mb. I have 3 such files which I am trying to map onto a reference genome. The output sam file of first 2 files are about 500MB. But the third file gives a 2TB sam file and it has not completed running. Is there any reason of why this could be happening ? Any help would be appreciated.

The command I used is as follows:

minimap2 -a reference.mmi query.fasta -o output.sam -t 20
alignment sequence minimap2 • 917 views
ADD COMMENTlink modified 10 months ago by h.mon31k • written 10 months ago by Inquisitive8995170
1

You could consider avoiding creating a sam intermediate:

minimap2 -a -t 20 reference.mmi query.fasta | samtools sort -o output.bam
ADD REPLYlink written 10 months ago by WouterDeCoster44k

Thanks for your answer. But I am still confused as the other 2 files of the same size gave the output of around 500Mb and this gives 2TB.

ADD REPLYlink written 10 months ago by Inquisitive8995170
1

Perhaps you have a lot of multi-mapping or secondary alignments?

ADD REPLYlink written 10 months ago by genomax89k

Thanks for your reply. Is there anyway with which I can restrict the mapping to only the top hit or something like that ? Are there any parameters in Minimap to do so ?

ADD REPLYlink written 10 months ago by Inquisitive8995170
1

You can set -N 0 to not retain secondary alignments.

ADD REPLYlink written 10 months ago by genomax89k

Why do you tag this as "assembly" while you are aligning? Why do you think this is a "software error"? Wouldn't "minimap2" be the best tag here?

ADD REPLYlink written 10 months ago by WouterDeCoster44k

Noted. Thank you for mentioning this

ADD REPLYlink written 10 months ago by Inquisitive8995170
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1435 users visited in the last hour