diff --git a/CHANGELOG.md b/CHANGELOG.md index 3da3237..f484fe1 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`
@@ -55,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)
diff --git a/metaphlan/utils/fix_relab_mpa4.py b/metaphlan/utils/fix_relab_mpa4.py index 40ccdd2..62d2954 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 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)