From cefbad85aa35e34df9daba88a6fad75f167ee630 Mon Sep 17 00:00:00 2001
From: Gavin John <>
Date: Thu, 16 May 2024 13:36:21 -0500
Subject: [PATCH 1/4] Add helpful error messages to read_fastx.py
---
metaphlan/utils/read_fastx.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/metaphlan/utils/read_fastx.py b/metaphlan/utils/read_fastx.py
index 5adb3dc..fd47e6f 100755
--- a/metaphlan/utils/read_fastx.py
+++ b/metaphlan/utils/read_fastx.py
@@ -114,10 +114,15 @@ def read_and_write_raw_int(fd, min_len=None, prefix_id=""):
# avg_read_length = len(l) + avg_read_length
# _ = sys.stdout.write(ignore_spaces(l))
+ if not idx:
+ sys.stderr.write('Error: no reads found.\n')
+ sys.exit(1)
+
nreads = idx - discarded
if not nreads:
- nreads, avg_read_length = 0, 0
+ sys.stderr.write('Error: no reads longer than {} bp found.\n'.format(min_len))
+ sys.exit(1)
return (nreads, avg_read_length)
From ccea1693d6e7e9ec8bfd20cd916593765f831856 Mon Sep 17 00:00:00 2001
From: Claudia Mengoni <43252093+Cengoni@users.noreply.github.com>
Date: Wed, 22 May 2024 16:17:40 +0200
Subject: [PATCH 2/4] Update CHANGELOG.md
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3da3237..d3112f7 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@
* [MetaPhlAn] Implementation of the option `--subsampling_paired [N_PAIRED_READS]` to subsample paired-end input reads. It needs to be used in conjunction with `-1 [FORWARD_READS_FILE]` and `-2 [REVERSE_READS_FILE]`
### Fixes
* [MetaPhlAn] Fixed a bug that would halt MetaPhlAn execution when the option `--profile_vsc` was used but had no viral hits
+* [MetaPhlAn] Fixed a bug that would halt MetaPhlAn execution when the number of reads to map was zero
* [StrainPhlAn] Fixed a bug in the new implementation (since v4.1) of `–-print_clades_only`
From 66d5a7ebd21c64c5b6fd6db6a35ff44b820dfbd2 Mon Sep 17 00:00:00 2001
From: Claudia Mengoni <43252093+Cengoni@users.noreply.github.com>
Date: Thu, 23 May 2024 14:02:35 +0200
Subject: [PATCH 3/4] Update CHANGELOG.md
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d3112f7..f484fe1 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -56,7 +56,7 @@
* [StrainPhlAn] Improved StrainPhlAn's speed when running with the --print_clades_only option
### Missing features
* [MetaPhlAn] The GTDB taxonomic assignment for the vOct22 database is not available yet (expected release: end of Feb 2023)
-* [MetaPhlAn] The phylogenetic tree of life for the vOct22 database is not available yet (expected release: TBD).
+* [MetaPhlAn] The phylogenetic tree of life for the vOct22 database is not available yet (expected release: TBD)
From a8c2971dd87c7cbd80b84b515f611c97792c8b08 Mon Sep 17 00:00:00 2001
From: Claudia Mengoni <43252093+Cengoni@users.noreply.github.com>
Date: Mon, 3 Jun 2024 20:45:47 +0200
Subject: [PATCH 4/4] Update fix_relab_mpa4.py
---
metaphlan/utils/fix_relab_mpa4.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/metaphlan/utils/fix_relab_mpa4.py b/metaphlan/utils/fix_relab_mpa4.py
index 7ece6ae..b020e9e 100755
--- a/metaphlan/utils/fix_relab_mpa4.py
+++ b/metaphlan/utils/fix_relab_mpa4.py
@@ -7,7 +7,7 @@
import os, time
try:
- from .util_fun import info, error, warning
+ from .util_fun import info, error, warning, openrt
except ImportError:
from util_fun import info, error, warning, openrt
import argparse as ap