Skip to content
Snippets Groups Projects
Commit da69797f authored by Pau Andrio's avatar Pau Andrio
Browse files

Updating biopython

parent 2f079955
No related branches found
No related tags found
No related merge requests found
Pipeline #15729 failed with stages
in 5 minutes and 16 seconds
......@@ -17,7 +17,7 @@ The latest documentation of this package can be found in our readthedocs site:
[latest API documentation](http://biobb_common.readthedocs.io/en/latest/).
### Version
v3.5.0 2020.4
v3.5.1 2020.4
### Copyright & Licensing
This software has been developed in the [MMB group](http://mmb.irbbarcelona.org) at the [BSC](http://www.bsc.es/) & [IRB](https://www.irbbarcelona.org/) for the [European BioExcel](http://bioexcel.eu/), funded by the European Commission (EU H2020 [823830](http://cordis.europa.eu/projects/823830), EU H2020 [675728](http://cordis.europa.eu/projects/675728)).
......
......@@ -17,7 +17,7 @@ The latest documentation of this package can be found in our readthedocs site:
[latest API documentation](http://biobb_common.readthedocs.io/en/latest/).
### Version
v3.5.0 2020.4
v3.5.1 2020.4
### Copyright & Licensing
This software has been developed in the [MMB group](http://mmb.irbbarcelona.org) at the [BSC](http://www.bsc.es/) & [IRB](https://www.irbbarcelona.org/) for the [European BioExcel](http://bioexcel.eu/), funded by the European Commission (EU H2020 [823830](http://cordis.europa.eu/projects/823830), EU H2020 [675728](http://cordis.europa.eu/projects/675728)).
......
......@@ -6,7 +6,7 @@
"conda": "https://anaconda.org/bioconda/biobb_common",
"docker": "https://quay.io/repository/biocontainers/biobb_common",
"singularity": "https://www.singularity-hub.org/collections/2734/usage",
"version": "3.5.0",
"version": "3.5.1",
"tools" : [
{
"block" : "",
......
......@@ -59,7 +59,7 @@ def create_unique_dir(path: str = '', prefix: str = '', number_attempts: int = 1
if out_log:
out_log.info(new_dir + ' Already exists')
out_log.info('Retrying %i times more' % (number_attempts - i))
new_dir = prefix + str(uuid.uuid4())
new_dir = prefix + str(uuid.uuid4().hex)
if path:
new_dir = str(Path(path).joinpath(new_dir))
if out_log:
......@@ -434,8 +434,10 @@ def copy_to_container(container_path: str, container_volume_path: str, io_dict:
if Path(file_path).exists():
shutil.copy2(file_path, unique_dir)
log(f'Copy: {file_path} to {unique_dir}')
# Default files in GMXLIB path
container_io_dict["in"][file_ref] = str(Path(container_volume_path).joinpath(Path(file_path).name))
container_io_dict["in"][file_ref] = str(Path(container_volume_path).joinpath(Path(file_path).name))
else:
# Default files in GMXLIB path like gmx_solvate -> input_solvent_gro_path (spc216.gro)
container_io_dict["in"][file_ref] = file_path
# OUT files assign INTERNAL PATH
for file_ref, file_path in io_dict["out"].items():
......@@ -466,7 +468,7 @@ def create_cmd_line(cmd: typing.Iterable[str], container_path: str = '', host_vo
if container_path.endswith('singularity'):
log('Using Singularity image %s' % container_image, out_log, global_log)
if not Path(container_image).exists():
log(f"{container_image} does not exist trying to pull it")
log(f"{container_image} does not exist trying to pull it", out_log, global_log)
container_image_name = str(Path(container_image).with_suffix('.sif').name)
singularity_pull_cmd = [container_path, 'pull', '--name', container_image_name, container_image]
try:
......@@ -475,10 +477,10 @@ def create_cmd_line(cmd: typing.Iterable[str], container_path: str = '', host_vo
if Path(container_image_name).exists():
container_image = container_image_name
else:
raise
raise FileNotFoundError
except:
log(f"{' '.join(singularity_pull_cmd)} not found")
raise
log(f"{' '.join(singularity_pull_cmd)} not found", out_log, global_log)
raise FileNotFoundError
singularity_cmd = [container_path, 'exec', '-e', '--bind', host_volume + ':' + container_volume, container_image]
# If we are working on a mac remove -e option because is still no available
if platform == "darwin":
......
......@@ -6,6 +6,7 @@ import sys
import shutil
import hashlib
import Bio.PDB
import codecs
from biobb_common.configuration import settings
from biobb_common.tools import file_utils as fu
......@@ -185,9 +186,9 @@ def compare_top_itp(file_a: str, file_b: str) -> bool:
print("Comparing TOP/ITP:")
print(" FILE_A: "+file_a)
print(" FILE_B: "+file_b)
with open(file_a) as f_a:
with codecs.open(file_a, 'r', encoding='utf-8', errors='ignore') as f_a:
next(f_a)
with open(file_b) as f_b:
with codecs.open(file_b, 'r', encoding='utf-8', errors='ignore') as f_b:
next(f_b)
return [line.strip() for line in f_a if not line.strip().startswith(';')] == [line.strip() for line in f_b if not line.strip().startswith(';')]
......
......@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools.setup(
name="biobb_common",
version="3.5.0",
version="3.5.1",
author="Biobb developers",
author_email="pau.andrio@bsc.es",
description="Biobb_common is the base package required to use the biobb packages.",
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment