Nextomics / NextDenovo

Fast and accurate de novo assembler for long reads
GNU General Public License v3.0
361 stars 53 forks source link

minimap2 option "-I" #13

Closed iggyB closed 5 years ago

iggyB commented 5 years ago

Hej,

In nextDenovo, lines 165-171 contain hard-coded chunk size -I 3G:

            if part_file != seed_file:
                cmd += SCRIPT_PATH + '/bin/minimap2-hack -I 3G --dual=yes ' + cfg['minimap2_options'] + ' ' + seed_file  + ' ' + part_file + \
                    ' > ' + os.path.basename(seed_file) + '.' +  str(k) + '.ovl;'
                cmd += 'ln -sf ' + os.path.basename(seed_file) + '.' +  str(k) + '.ovl ' + os.path.basename(part_file) + '.' +  str(k) + '.ovl;'
            else:
                cmd += SCRIPT_PATH + '/bin/minimap2-hack -I 3G ' + cfg['minimap2_options'] + ' ' + seed_file  + ' ' + part_file + \
                    ' > ' + os.path.basename(seed_file) + '.' +  str(k) + '.ovl;'

If one adds additional minimap2 options, the command results in two "-I" flags. Not sure how minimap2 interprets such situation.

Is there any reason for 3G chunks, or can it be just removed?

Cheers, Iggy

moold commented 5 years ago

Yes, you can remove it, but removing it means minimap2 need more memory to do alignment, our test shown setting -I 3G will make minimap2 use about 30-40 Gb memory for a single task with 8 threads.

moold commented 5 years ago

If you add additional minimap2 options, the command results in two "-I" flags. This is no problem, and the later will overwrite the first one.

iggyB commented 5 years ago

Alright! Sounds good.