From d0cff3eb36e148bbf05dab69f5a22e272d23b50d Mon Sep 17 00:00:00 2001 From: Heng Li Date: Thu, 18 Nov 2021 17:11:48 -0500 Subject: [PATCH] Release minimap2-2.23 (r1111) --- NEWS.md | 18 ++++++++++++++++++ README.md | 4 ++-- cookbook.md | 4 ++-- main.c | 2 +- minimap2.1 | 4 ++-- misc/paftools.js | 31 +++++++++++++++++++++++++++---- python/mappy.pyx | 2 +- setup.py | 2 +- 8 files changed, 54 insertions(+), 13 deletions(-) diff --git a/NEWS.md b/NEWS.md index bce33f5..49bdb90 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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) ---------------------------------- diff --git a/README.md b/README.md index 90af282..6c8a232 100644 --- a/README.md +++ b/README.md @@ -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 the [release page][release] with: ```sh -curl -L https://github.com/lh3/minimap2/releases/download/v2.22/minimap2-2.22_x64-linux.tar.bz2 | tar -jxvf - -./minimap2-2.22_x64-linux/minimap2 +curl -L https://github.com/lh3/minimap2/releases/download/v2.23/minimap2-2.23_x64-linux.tar.bz2 | tar -jxvf - +./minimap2-2.23_x64-linux/minimap2 ``` 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 diff --git a/cookbook.md b/cookbook.md index 14c4dfa..adaac59 100644 --- a/cookbook.md +++ b/cookbook.md @@ -31,8 +31,8 @@ To acquire the data used in this cookbook and to install minimap2 and paftools, please follow the command lines below: ```sh # install minimap2 executables -curl -L https://github.com/lh3/minimap2/releases/download/v2.22/minimap2-2.22_x64-linux.tar.bz2 | tar jxf - -cp minimap2-2.22_x64-linux/{minimap2,k8,paftools.js} . # copy executables +curl -L https://github.com/lh3/minimap2/releases/download/v2.23/minimap2-2.23_x64-linux.tar.bz2 | tar jxf - +cp minimap2-2.23_x64-linux/{minimap2,k8,paftools.js} . # copy executables export PATH="$PATH:"`pwd` # put the current directory on PATH # download example datasets curl -L https://github.com/lh3/minimap2/releases/download/v2.10/cookbook-data.tgz | tar zxf - diff --git a/main.c b/main.c index d3e4df1..eabda3d 100644 --- a/main.c +++ b/main.c @@ -7,7 +7,7 @@ #include "mmpriv.h" #include "ketopt.h" -#define MM_VERSION "2.22-r1110-dirty" +#define MM_VERSION "2.23-r1111" #ifdef __linux__ #include diff --git a/minimap2.1 b/minimap2.1 index 8e57e44..c321e60 100644 --- a/minimap2.1 +++ b/minimap2.1 @@ -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 .PP 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 .I FLOAT 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 .BI -e \ INT Sample a high-frequency minimizer every diff --git a/misc/paftools.js b/misc/paftools.js index fe9d18f..8cca14b 100755 --- a/misc/paftools.js +++ b/misc/paftools.js @@ -1,6 +1,6 @@ #!/usr/bin/env k8 -var paftools_version = '2.22-r1101'; +var paftools_version = '2.23-r1111'; /***************************** ***** Library functions ***** @@ -1532,12 +1532,13 @@ function paf_view(args) function paf_gff2bed(args) { - var c, fn_ucsc_fai = null, is_short = false, keep_gff = false, print_junc = false; - while ((c = getopt(args, "u:sgj")) != null) { + var c, fn_ucsc_fai = null, is_short = false, keep_gff = false, print_junc = false, output_gene = false; + while ((c = getopt(args, "u:sgjG")) != null) { if (c == 'u') fn_ucsc_fai = getopt.arg; else if (c == 's') is_short = true; else if (c == 'g') keep_gff = true; else if (c == 'j') print_junc = true; + else if (c == 'G') output_gene = true; } 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(",") + ","); } - 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_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 file = args[getopt.ind] == '-'? new File() : new File(args[getopt.ind]); @@ -1620,6 +1623,26 @@ function paf_gff2bed(args) 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; t[3] = parseInt(t[3]) - 1; t[4] = parseInt(t[4]); diff --git a/python/mappy.pyx b/python/mappy.pyx index 8728a3e..23a4772 100644 --- a/python/mappy.pyx +++ b/python/mappy.pyx @@ -3,7 +3,7 @@ from libc.stdlib cimport free cimport cmappy import sys -__version__ = '2.22' +__version__ = '2.23' cmappy.mm_reset_timer() diff --git a/setup.py b/setup.py index 38762a8..a7760fd 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ def readme(): setup( name = 'mappy', - version = '2.22', + version = '2.23', url = 'https://github.com/lh3/minimap2', description = 'Minimap2 python binding', long_description = readme(),