ITBE-Lab / MA

The Modular Aligner and The Modular SV Caller
MIT License
45 stars 3 forks source link

How to run MA on short reads faster? #9

Closed dawnmy closed 3 years ago

dawnmy commented 3 years ago

I am using MA for short reads alignment which takes 20-30 minutes per sample. The results look great. But it would be great if I can have 2-3 times speedup. What parameters settings can help speedup MA on short reads without losing too much accuracy?

MarkusRainerSchmidt commented 3 years ago

Hi,

So obviously any parameter setting that helps with the runtime will be detrimental to the aligner’s accuracy – so please make sure that the results are still good enough on your data after changing the parameters. That being said, I would try (one or two of) the following things:

MarkusRainerSchmidt commented 3 years ago

If the limitation on your system is the hard drive (i.e. MA does not reach >=95% cpu usage), it might be worth to align g-zipped files.

Make sure that ./maCMD -h prints “Compiled with following switches: WITH_ZLIB ...” in the second to last line before using .gz files as input. If you don’t see the WITH_ZLIB, install the zlib (-dev) package, then reconfigure & recompile.

dawnmy commented 3 years ago

Thank you so much for the detailed explanation. I was wondering how exactly the presettings like -p Illumina_Paired and Nanopore change the underlying parameters? I guess the presetting Nanopore should be more tolerant to mismatches and INDELs in homopolymeric regions during seed matching and alignment since the long reads data have high error rate. For the Illumina presetting, the alignment of 100bp PE reads looked better when I changed --Minimal_Alignment_Score to 50.

MarkusRainerSchmidt commented 3 years ago

You can look at the different presetting by running e.g. maCMD –p Illumina_Paired -h. This will update the shown default parameters. Alternatively, line 922 and following in https://github.com/ITBE-Lab/MA/blob/release/libs/ma/inc/util/parameter.h sets up the presetting in the code.

The Minimal_Alignment_Score parameter is merely a cutoff for the output. MA will discard all alignments with a DP score lower than the given value.

dawnmy commented 3 years ago

Have tested the recommended parameter setting. It gets ~2x speedups.