philres / ngmlr

NGMLR is a long-read mapper designed to align PacBio or Oxford Nanopore (standard and ultra-long) to a reference genome with a focus on reads that span structural variations
MIT License
293 stars 40 forks source link

Read index #74

Closed shimbalama closed 4 years ago

shimbalama commented 4 years ago

Hi, I'm using NGMLR in WDL so I have to use --skip-write or it writes and index per shard (1000+). Is it possible to read an existing index in to save generating it for every shard?

Thanks, Liam

fritzsedlazeck commented 4 years ago

You can run ngmlr with no sample only the reference once. This should store the index. Subsequently, just call ngmlr with the same reference and path and it should be fine.

I hope that helps. Cheers Fritz

niemasd commented 2 years ago

This is useful information, and it may be worth mentioning in the README and/or in the usage message (I was wondering precisely this, looked through the README, didn't see any info about it, looked at the help message, didn't see anything there, and then hoped someone had asked about it in a GitHub Issue)

niemasd commented 2 years ago

Actually, I tried running NGMLR like this:

ngmlr -x pacbio -t 8 -r /home/niema/.viralmsa/NC_001802/NC_001802.fas

And while it did create the reference, it assumed reads would be passed in via STDIN so it just hung infinitely until force-closed. Same behavior when I just run with just the reference genome + number of threads:

ngmlr -t 8 -r /home/niema/.viralmsa/NC_001802/NC_001802.fas

A hacky workaround for now is to just pipe in nothing, but it would be nice if there were a better solution (I can't seem to find one):

echo -n "" | ngmlr -x pacbio -t 8 -r /home/niema/.viralmsa/NC_001802/NC_001802.fas