Release minimap2-2.23 (r1111)

This commit is contained in:
Heng Li 2021-11-18 17:11:48 -05:00
parent ac334639ce
commit d0cff3eb36
8 changed files with 54 additions and 13 deletions

18
NEWS.md
View File

@ -1,3 +1,21 @@
Release 2.23-r1111 (18 November 2021)
-------------------------------------
Notable changes:
* Bugfix: fixed missing alignments around long inversions (#806 and #816).
This bug affected v2.19 through v2.22.
* Improvement: avoid extremely long mapping time for pathologic reads with
highly repeated k-mers not in the reference (#771). Use --q-occ-frac=0
to disable the new heuristic.
* Change: use --cap-kalloc=1g by default.
(2.23: 18 November 2021, r1111)
Release 2.22-r1101 (7 August 2021) Release 2.22-r1101 (7 August 2021)
---------------------------------- ----------------------------------

View File

@ -74,8 +74,8 @@ Detailed evaluations are available from the [minimap2 paper][doi] or the
Minimap2 is optimized for x86-64 CPUs. You can acquire precompiled binaries from Minimap2 is optimized for x86-64 CPUs. You can acquire precompiled binaries from
the [release page][release] with: the [release page][release] with:
```sh ```sh
curl -L https://github.com/lh3/minimap2/releases/download/v2.22/minimap2-2.22_x64-linux.tar.bz2 | tar -jxvf - curl -L https://github.com/lh3/minimap2/releases/download/v2.23/minimap2-2.23_x64-linux.tar.bz2 | tar -jxvf -
./minimap2-2.22_x64-linux/minimap2 ./minimap2-2.23_x64-linux/minimap2
``` ```
If you want to compile from the source, you need to have a C compiler, GNU make If you want to compile from the source, you need to have a C compiler, GNU make
and zlib development files installed. Then type `make` in the source code and zlib development files installed. Then type `make` in the source code

View File

@ -31,8 +31,8 @@ To acquire the data used in this cookbook and to install minimap2 and paftools,
please follow the command lines below: please follow the command lines below:
```sh ```sh
# install minimap2 executables # install minimap2 executables
curl -L https://github.com/lh3/minimap2/releases/download/v2.22/minimap2-2.22_x64-linux.tar.bz2 | tar jxf - curl -L https://github.com/lh3/minimap2/releases/download/v2.23/minimap2-2.23_x64-linux.tar.bz2 | tar jxf -
cp minimap2-2.22_x64-linux/{minimap2,k8,paftools.js} . # copy executables cp minimap2-2.23_x64-linux/{minimap2,k8,paftools.js} . # copy executables
export PATH="$PATH:"`pwd` # put the current directory on PATH export PATH="$PATH:"`pwd` # put the current directory on PATH
# download example datasets # download example datasets
curl -L https://github.com/lh3/minimap2/releases/download/v2.10/cookbook-data.tgz | tar zxf - curl -L https://github.com/lh3/minimap2/releases/download/v2.10/cookbook-data.tgz | tar zxf -

2
main.c
View File

@ -7,7 +7,7 @@
#include "mmpriv.h" #include "mmpriv.h"
#include "ketopt.h" #include "ketopt.h"
#define MM_VERSION "2.22-r1110-dirty" #define MM_VERSION "2.23-r1111"
#ifdef __linux__ #ifdef __linux__
#include <sys/resource.h> #include <sys/resource.h>

View File

@ -1,4 +1,4 @@
.TH minimap2 1 "7 August 2021" "minimap2-2.22 (r1101)" "Bioinformatics tools" .TH minimap2 1 "18 November 2021" "minimap2-2.23 (r1111)" "Bioinformatics tools"
.SH NAME .SH NAME
.PP .PP
minimap2 - mapping and alignment between collections of DNA sequences minimap2 - mapping and alignment between collections of DNA sequences
@ -159,7 +159,7 @@ in earlier versions of minimap2.
Discard a query minimizer if its occurrence is higher than Discard a query minimizer if its occurrence is higher than
.I FLOAT .I FLOAT
fraction of query minimizers and than the reference occurrence threshold fraction of query minimizers and than the reference occurrence threshold
[0.02]. Set 0 to disable. Available since r1105. [0.01]. Set 0 to disable. Available since r1105.
.TP .TP
.BI -e \ INT .BI -e \ INT
Sample a high-frequency minimizer every Sample a high-frequency minimizer every

View File

@ -1,6 +1,6 @@
#!/usr/bin/env k8 #!/usr/bin/env k8
var paftools_version = '2.22-r1101'; var paftools_version = '2.23-r1111';
/***************************** /*****************************
***** Library functions ***** ***** Library functions *****
@ -1532,12 +1532,13 @@ function paf_view(args)
function paf_gff2bed(args) function paf_gff2bed(args)
{ {
var c, fn_ucsc_fai = null, is_short = false, keep_gff = false, print_junc = false; var c, fn_ucsc_fai = null, is_short = false, keep_gff = false, print_junc = false, output_gene = false;
while ((c = getopt(args, "u:sgj")) != null) { while ((c = getopt(args, "u:sgjG")) != null) {
if (c == 'u') fn_ucsc_fai = getopt.arg; if (c == 'u') fn_ucsc_fai = getopt.arg;
else if (c == 's') is_short = true; else if (c == 's') is_short = true;
else if (c == 'g') keep_gff = true; else if (c == 'g') keep_gff = true;
else if (c == 'j') print_junc = true; else if (c == 'j') print_junc = true;
else if (c == 'G') output_gene = true;
} }
if (getopt.ind == args.length) { if (getopt.ind == args.length) {
@ -1605,8 +1606,10 @@ function paf_gff2bed(args)
print(a[0][0], st, en, name, 1000, a[0][3], cds_st, cds_en, color, a.length, sizes.join(",") + ",", starts.join(",") + ","); print(a[0][0], st, en, name, 1000, a[0][3], cds_st, cds_en, color, a.length, sizes.join(",") + ",", starts.join(",") + ",");
} }
var re_gtf = /\b(transcript_id|transcript_type|transcript_biotype|gene_name|gene_id|gbkey|transcript_name) "([^"]+)";/g; var re_gtf = /\b(transcript_id|transcript_type|transcript_biotype|gene_name|gene_id|gbkey|transcript_name) "([^"]+)";/g;
var re_gff3 = /\b(transcript_id|transcript_type|transcript_biotype|gene_name|gene_id|gbkey|transcript_name)=([^;]+)/g; var re_gff3 = /\b(transcript_id|transcript_type|transcript_biotype|gene_name|gene_id|gbkey|transcript_name)=([^;]+)/g;
var re_gtf_gene = /\b(gene_id|gene_type|gene_name) "([^;]+)";/g;
var re_gff3_gene = /\b(gene_id|gene_type|source_gene|gene_biotype|gene_name)=([^;]+);/g;
var buf = new Bytes(); var buf = new Bytes();
var file = args[getopt.ind] == '-'? new File() : new File(args[getopt.ind]); var file = args[getopt.ind] == '-'? new File() : new File(args[getopt.ind]);
@ -1620,6 +1623,26 @@ function paf_gff2bed(args)
continue; continue;
} }
if (t[0].charAt(0) == '#') continue; if (t[0].charAt(0) == '#') continue;
if (output_gene) {
var id = null, src = null, biotype = null, type = "", name = "N/A";
if (t[2] != "gene") continue;
while ((m = re_gtf_gene.exec(t[8])) != null) {
if (m[1] == "gene_id") id = m[2];
else if (m[1] == "gene_type") type = m[2];
else if (m[1] == "gene_name") name = m[2];
}
while ((m = re_gff3_gene.exec(t[8])) != null) {
if (m[1] == "gene_id") id = m[2];
else if (m[1] == "source_gene") src = m[2];
else if (m[1] == "gene_type") type = m[2];
else if (m[1] == "gene_biotype") biotype = m[2];
else if (m[1] == "gene_name") name = m[2];
}
if (src != null) id = src;
if (type == "" && biotype != null) type = biotype;
print(t[0], parseInt(t[3]) - 1, t[4], [id, type, name].join("|"), 1000, t[6]);
continue;
}
if (t[2] != "CDS" && t[2] != "exon") continue; if (t[2] != "CDS" && t[2] != "exon") continue;
t[3] = parseInt(t[3]) - 1; t[3] = parseInt(t[3]) - 1;
t[4] = parseInt(t[4]); t[4] = parseInt(t[4]);

View File

@ -3,7 +3,7 @@ from libc.stdlib cimport free
cimport cmappy cimport cmappy
import sys import sys
__version__ = '2.22' __version__ = '2.23'
cmappy.mm_reset_timer() cmappy.mm_reset_timer()

View File

@ -23,7 +23,7 @@ def readme():
setup( setup(
name = 'mappy', name = 'mappy',
version = '2.22', version = '2.23',
url = 'https://github.com/lh3/minimap2', url = 'https://github.com/lh3/minimap2',
description = 'Minimap2 python binding', description = 'Minimap2 python binding',
long_description = readme(), long_description = readme(),