[med-svn] [Git][med-team/busco][master] 3 commits: New upstream version 5.2.1
Nilesh Patra (@nilesh)
gitlab at salsa.debian.org
Fri Jul 9 17:46:57 BST 2021
Nilesh Patra pushed to branch master at Debian Med / busco
Commits:
735991bf by Nilesh Patra at 2021-07-09T22:09:24+05:30
New upstream version 5.2.1
- - - - -
6d90b370 by Nilesh Patra at 2021-07-09T22:09:30+05:30
Update upstream source from tag 'upstream/5.2.1'
Update to upstream version '5.2.1'
with Debian dir f5afbfd811ed02044863bd20ecae06a2824db228
- - - - -
f74f6e63 by Nilesh Patra at 2021-07-09T22:10:18+05:30
Interim changelog entry
- - - - -
6 changed files:
- CHANGELOG
- debian/changelog
- src/busco/Actions.py
- src/busco/BuscoPlacer.py
- src/busco/_version.py
- tests/unittests/run_BUSCO_unittests.py
Changes:
=====================================
CHANGELOG
=====================================
@@ -1,3 +1,6 @@
+5.2.1
+- Minor bug fixes
+
5.2.0
- Issue #224 fixed
- Issue #232 fixed
=====================================
debian/changelog
=====================================
@@ -1,6 +1,6 @@
-busco (5.2.0-1) UNRELEASED; urgency=medium
+busco (5.2.1-1) UNRELEASED; urgency=medium
- * New upstream version 5.2.0
+ * New upstream version 5.2.1
* Update manpage
* Install config.ini file as an example
* Add Depends on python3-biopython and python3-pandas
@@ -8,7 +8,7 @@ busco (5.2.0-1) UNRELEASED; urgency=medium
* d/p/fix-and-disable-tests.patch: Add patch to fix test execution
* Add autopkgtests
- -- Nilesh Patra <nilesh at debian.org> Fri, 02 Jul 2021 02:32:36 +0530
+ -- Nilesh Patra <nilesh at debian.org> Fri, 09 Jul 2021 22:09:38 +0530
busco (5.0.0-1) unstable; urgency=medium
=====================================
src/busco/Actions.py
=====================================
@@ -31,7 +31,10 @@ class ListLineagesAction(argparse.Action):
type(self).logger.error(se)
raise SystemExit(1)
finally:
- os.remove("busco_{}.log".format(BuscoLogger.pid))
+ try:
+ os.remove("busco_{}.log".format(BuscoLogger.pid))
+ except FileNotFoundError:
+ pass
parser.exit()
def print_lineages(self):
@@ -77,7 +80,10 @@ class DirectDownload(argparse.Action):
type(self).logger.error(se)
raise SystemExit(1)
finally:
- os.remove("busco_{}.log".format(BuscoLogger.random_id))
+ try:
+ os.remove("busco_{}.log".format(BuscoLogger.pid))
+ except FileNotFoundError:
+ pass
parser.exit()
def download_datasets(self, bdm, values):
=====================================
src/busco/BuscoPlacer.py
=====================================
@@ -6,7 +6,7 @@
:synopsis: BuscoPlacer implements methods required for automatically selecting the appropriate dataset
to be used during BUSCO analysis
.. versionadded:: 4.0.0
-.. versionchanged:: 4.0.0
+.. versionchanged:: 5.2.1
Copyright (c) 2016-2021, Evgeny Zdobnov (ez at ezlab.org)
Licensed under the MIT license. See LICENSE.md file.
@@ -23,6 +23,18 @@ from busco.busco_tools.sepp import SEPPRunner
logger = BuscoLogger.get_logger(__name__)
+class NoMarkersError(Exception):
+ """
+ Module-specific exception
+ """
+
+ def __init__(self, value=None):
+ self.value = value
+
+ def __str__(self):
+ return self.value
+
+
class BuscoPlacer:
_logger = BuscoLogger.get_logger(__name__)
@@ -107,10 +119,19 @@ class BuscoPlacer:
# If mode is genome, substitute input with prodigal/augustus output
self._download_placement_files()
placement_file_versions = self._get_placement_file_versions()
- self._extract_marker_sequences()
- self._run_sepp()
-
- dataset = self._pick_dataset()
+ try:
+ self._extract_marker_sequences()
+ self._run_sepp()
+
+ dataset = self._pick_dataset()
+ except NoMarkersError:
+ root_lineage = self._config.get("busco_run", "name")
+ logger.info(
+ "No marker genes were found. Root lineage {} is kept".format(
+ root_lineage
+ )
+ )
+ dataset = (root_lineage.split("_")[0], None, None)
return dataset, placement_file_versions
@@ -344,6 +365,9 @@ class BuscoPlacer:
list(gene_matches.keys())[0]
) # The list should only have one entry because they are single copy buscos
+ if len(marker_genes_names) == 0:
+ raise NoMarkersError
+
marker_genes_records = []
if isinstance(self.protein_seqs, (str,)):
list_protein_seqs = [self.protein_seqs]
=====================================
src/busco/_version.py
=====================================
@@ -6,4 +6,4 @@ Copyright (c) 2016-2021, Evgeny Zdobnov (ez at ezlab.org)
Licensed under the MIT license. See LICENSE.md file.
"""
-__version__ = "5.2.0"
+__version__ = "5.2.1"
=====================================
tests/unittests/run_BUSCO_unittests.py
=====================================
@@ -58,6 +58,31 @@ class TestParams(unittest.TestCase):
sys.stdout = sys.__stdout__
self.assertEqual(cm.exception.code, 0)
+ def test_list_lineages(self):
+ args = ["--list-datasets"]
+ sys.argv[1:] = args
+ with self.assertRaises(SystemExit) as cm:
+ captured_output = io.StringIO()
+ sys.stdout = captured_output
+ try:
+ run_BUSCO._parse_args()
+ finally:
+ sys.stdout = sys.__stdout__
+ self.assertEqual(cm.exception.code, 0)
+
+ @patch("busco.BuscoDownloadManager.logger.info")
+ def test_direct_download(self, *args):
+ args = ["--download", "archaea_odb10"]
+ sys.argv[1:] = args
+ with self.assertRaises(SystemExit) as cm:
+ captured_output = io.StringIO()
+ sys.stdout = captured_output
+ try:
+ run_BUSCO._parse_args()
+ finally:
+ sys.stdout = sys.__stdout__
+ self.assertEqual(cm.exception.code, 0)
+
def test_cmdline_options_short_minimum(self):
params = run_BUSCO._parse_args()
correct_parse = {
View it on GitLab: https://salsa.debian.org/med-team/busco/-/compare/13a6b5e0847b200ff620f3f9fc93b7aff80e087c...f74f6e63cd60bc848648ddfe8e0878d152e7685b
--
View it on GitLab: https://salsa.debian.org/med-team/busco/-/compare/13a6b5e0847b200ff620f3f9fc93b7aff80e087c...f74f6e63cd60bc848648ddfe8e0878d152e7685b
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20210709/9d22f34e/attachment-0001.htm>
More information about the debian-med-commit
mailing list