Skip to content

Feature Request: Compress Index When Saving #951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
schorlton opened this issue Aug 14, 2022 · 3 comments
Open

Feature Request: Compress Index When Saving #951

schorlton opened this issue Aug 14, 2022 · 3 comments

Comments

@schorlton
Copy link

Thank you for the amazing tool.

Feature request: optional compress index when saving it to disk? My evaluation suggests that running gzip on the .mmi index can compress it by up to 50%. The .mmi is already multiple times larger than it's original FASTA file. When running on really large FASTA files, the index can be massive. As an extreme example, indexing NCBI nt results in an index of 1.6 TB.

Would appreciate if minimap2 could implement simple compression when reading/writing the .mmi index to disk. Something like:

minimap2 -ax map-ont -d index.mmi.gz --gzip-index nt.fna
minimap2 --split-prefix temp index.mmi.gz reads.fastq

Thanks for your consideration!

@godofdream
Copy link

You could simply pipe the output through gzip

@schorlton
Copy link
Author

You could simply pipe the output through gzip

How? The index save location is specified with an arg, and utilized during mapping with a positional arg to minimap2.

@W-L
Copy link

W-L commented Nov 29, 2022

You can use a little trick with /dev/stdout: minimap2 -x map-ont -d /dev/stdout seqs.fa | gzip >seqs.mmi.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants