[med-svn] [Git][med-team/busco][master] 3 commits: New upstream version 4.1.3
Nilesh Patra
gitlab at salsa.debian.org
Fri Sep 18 21:25:32 BST 2020
Nilesh Patra pushed to branch master at Debian Med / busco
Commits:
4809fcda by Nilesh Patra at 2020-09-19T01:52:27+05:30
New upstream version 4.1.3
- - - - -
3b9735e1 by Nilesh Patra at 2020-09-19T01:52:32+05:30
Update upstream source from tag 'upstream/4.1.3'
Update to upstream version '4.1.3'
with Debian dir 08bba538eb50bb76330cef5a920f205c2fcc3992
- - - - -
3edc0c11 by Nilesh Patra at 2020-09-19T01:55:14+05:30
Update changelog
- - - - -
8 changed files:
- CHANGELOG
- README.md
- debian/changelog
- src/busco/BuscoTools.py
- src/busco/_version.py
- src/busco/run_BUSCO.py
- test_data/bacteria/expected_log.txt
- test_data/eukaryota/expected_log.txt
Changes:
=====================================
CHANGELOG
=====================================
@@ -1,3 +1,8 @@
+4.1.3
+- Issue #296 fixed
+- Issue #305 fixed
+- Augustus parser improved
+
4.1.2
- Issue #295 fixed
=====================================
README.md
=====================================
@@ -1,5 +1,7 @@
**BUSCOv4 - Benchmarking sets of Universal Single-Copy Orthologs.**
+######Note: v4.1.3 is the latest stable release. To access v5.beta clone this repository and checkout the v5 branch with `git checkout v5.beta`
+
For full documentation please consult the user guide: https://busco.ezlab.org/busco_userguide.html
Main changes in v4:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+busco (4.1.3-1) unstable; urgency=medium
+
+ * Team Upload.
+ * New upstream version 4.1.3
+
+ -- Nilesh Patra <npatra974 at gmail.com> Sat, 19 Sep 2020 01:53:03 +0530
+
busco (4.1.2-1) unstable; urgency=medium
* Team upload.
=====================================
src/busco/BuscoTools.py
=====================================
@@ -9,7 +9,6 @@ from busco.BuscoConfig import BuscoConfig, BuscoConfigMain
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
-from Bio.Alphabet import IUPAC
import shutil
import csv
import numpy as np
@@ -65,7 +64,7 @@ class BaseRunner(Tool, metaclass=ABCMeta):
self.logfile_path_out = os.path.join(self.config.get("busco_run", "main_out"), "logs",
"{}_out.log".format(self.name))
- self.logfile_path_err = self.logfile_path_out.replace('_out.log', '_err.log')
+ self.logfile_path_err = self.logfile_path_out.rpartition("_out.log")[0] + "_err.log"
def init_checkpoint_file(self):
self.checkpoint_file = os.path.join(self.output_folder, ".checkpoint")
@@ -308,7 +307,7 @@ class ProdigalRunner(BaseRunner):
return
def configure_job(self, *args):
- tmp_name_nt = self._tmp_name.replace("faa", "fna")
+ tmp_name_nt = self._tmp_name.rpartition(".faa")[0] + ".fna"
prodigal_job = self.create_job()
prodigal_job.add_parameter("-p")
@@ -382,12 +381,13 @@ class ProdigalRunner(BaseRunner):
def _organize_prodigal_files(self, tmp_file, tmp_logfile):
shutil.copy(tmp_file, self.output_faa)
- shutil.copy(tmp_file.replace(".faa", ".fna"), self._output_fna)
+ shutil.copy(tmp_file.rpartition(".faa")[0] + ".fna", self._output_fna)
# copy selected log files from tmp/ to logs/
new_logname = os.path.join(self.log_folder, "prodigal_out.log")
shutil.copy(tmp_logfile, new_logname)
- shutil.copy(tmp_logfile.replace("_out.log", "_err.log"), new_logname.replace("_out.log", "_err.log"))
+ shutil.copy(tmp_logfile.rpartition("_out.log")[0] + "_err.log",
+ new_logname.rpartition("_out.log")[0] + "_err.log")
return
def _select_best_gc(self):
@@ -512,7 +512,7 @@ class HMMERRunner(BaseRunner):
elif isinstance(self.input_sequences, list):
input_files = [f for f in self.input_sequences if os.path.basename(f).startswith(busco_id)]
for seq_filename in input_files:
- output_filename = os.path.basename(seq_filename).replace("faa", "out")
+ output_filename = os.path.basename(seq_filename).rpartition(".faa")[0] + ".out"
yield busco_id, seq_filename, output_filename
@property
@@ -1894,7 +1894,7 @@ class AugustusRunner(BaseRunner):
# Augustus does not provide an option to write to an output file, so have to change the pipe target from the
# log file to the desired output file
self.logfile_path_out = out_filename
- err_logfile = os.path.join(self.tmp_dir, os.path.basename(out_filename.replace("out", "err")))
+ err_logfile = os.path.join(self.tmp_dir, os.path.basename(out_filename.rpartition(".out")[0] + ".err"))
self.logfile_path_err = err_logfile
self.err_logfiles.append(err_logfile)
@@ -1931,14 +1931,14 @@ class AugustusRunner(BaseRunner):
for line in f:
- if line.startswith("# end gene"):
+ if aa_sequence_section and (line.startswith("# end gene") or "]" in line):
aa_sequence_section = False
completed_record = True
if gene_id is not None:
aa_sequence = "".join(aa_sequence_parts)
nt_sequence = "".join(nt_sequence_parts)
- seq_record_aa = SeqRecord(Seq(aa_sequence.upper(), IUPAC.protein), id=gene_id)
- seq_record_nt = SeqRecord(Seq(nt_sequence.upper(), IUPAC.unambiguous_dna), id=gene_id)
+ seq_record_aa = SeqRecord(Seq(aa_sequence.upper()), id=gene_id)
+ seq_record_nt = SeqRecord(Seq(nt_sequence.upper()), id=gene_id)
sequences_aa.append(seq_record_aa)
sequences_nt.append(seq_record_nt)
aa_sequence_parts = []
@@ -1958,6 +1958,9 @@ class AugustusRunner(BaseRunner):
if line.startswith("# protein"):
nt_sequence_section = False
aa_sequence_section = True
+ if "]" in line:
+ aa_sequence_section = False
+ completed_record = True
line = line.strip().rstrip("]").split("[")
aa_sequence_parts.append(line[1])
continue
@@ -2062,8 +2065,9 @@ class AugustusRunner(BaseRunner):
def _write_sequences_to_file(self, filename, sequences_nt, sequences_aa):
- output_fna = os.path.join(self.extracted_prot_dir, filename.replace("out", "fna"))
- output_faa = os.path.join(self.extracted_prot_dir, filename.replace("out", "faa"))
+ filename_parts = filename.rpartition(".out")
+ output_fna = os.path.join(self.extracted_prot_dir, filename_parts[0] + ".fna" + filename_parts[-1])
+ output_faa = os.path.join(self.extracted_prot_dir, filename_parts[0] + ".faa" + filename_parts[-1])
self.output_sequences.append(output_faa)
with open(output_fna, "w") as out_fna:
=====================================
src/busco/_version.py
=====================================
@@ -6,4 +6,4 @@ Copyright (c) 2016-2020, Evgeny Zdobnov (ez at ezlab.org)
Licensed under the MIT license. See LICENSE.md file.
"""
-__version__ = "4.1.2"
+__version__ = "4.1.3"
=====================================
src/busco/run_BUSCO.py
=====================================
@@ -211,7 +211,7 @@ def run_BUSCO(params):
except ToolException as e:
logger.error(e)
- raise SystemExit
+ raise SystemExit(1)
except SystemExit as se:
logger.error(se)
@@ -229,17 +229,17 @@ def run_BUSCO(params):
pass
except:
pass
- raise SystemExit
+ raise SystemExit(1)
except KeyboardInterrupt:
logger.exception('A signal was sent to kill the process. \nBUSCO analysis failed !')
- raise SystemExit
+ raise SystemExit(1)
except BaseException:
exc_type, exc_value, exc_traceback = sys.exc_info()
logger.critical("Unhandled exception occurred:\n{}\n".format(
"".join(traceback.format_exception(exc_type, exc_value, exc_traceback))))
- raise SystemExit
+ raise SystemExit(1)
# Entry point
=====================================
test_data/bacteria/expected_log.txt
=====================================
@@ -1,4 +1,4 @@
-INFO: ***** Start a BUSCO v4.1.2 analysis, current time: 07/01/2020 18:43:08 *****
+INFO: ***** Start a BUSCO v4.1.3 analysis, current time: 07/01/2020 18:43:08 *****
INFO: Configuring BUSCO with /busco/config/config.ini
INFO: Mode is genome
INFO: Input file is genome.fna
=====================================
test_data/eukaryota/expected_log.txt
=====================================
@@ -1,4 +1,4 @@
-INFO: ***** Start a BUSCO v4.1.2 analysis, current time: 07/01/2020 17:20:41 *****
+INFO: ***** Start a BUSCO v4.1.3 analysis, current time: 07/01/2020 17:20:41 *****
INFO: Configuring BUSCO with /busco/config/config.ini
INFO: Mode is genome
INFO: Input file is genome.fna
View it on GitLab: https://salsa.debian.org/med-team/busco/-/compare/1c4781f6b08bd870d527196d9dae09387c727d0b...3edc0c112fc9c02d94ed7f9ab93056902f058a61
--
View it on GitLab: https://salsa.debian.org/med-team/busco/-/compare/1c4781f6b08bd870d527196d9dae09387c727d0b...3edc0c112fc9c02d94ed7f9ab93056902f058a61
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/20200918/139caafb/attachment-0001.html>
More information about the debian-med-commit
mailing list