Skip to content

Commit

Permalink
Merge pull request #13 from broadinstitute/dp-bump-core
Browse files Browse the repository at this point in the history
bump viral-core
  • Loading branch information
dpark01 authored Jun 11, 2020
2 parents e401f2f + e3b753b commit 03750b3
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 37 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/broadinstitute/viral-core:2.1.1
FROM quay.io/broadinstitute/viral-core:2.1.3

LABEL maintainer "[email protected]"

Expand Down
9 changes: 4 additions & 5 deletions assemble/gap2seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
import util.file
import util.misc

TOOL_NAME = 'gap2seq'
TOOL_VERSION = '3.1.1a2'
TOOL_NAME = 'Gap2Seq'

log = logging.getLogger(__name__)

Expand All @@ -31,11 +30,11 @@ class Gap2SeqTool(tools.Tool):

def __init__(self, install_methods=None):
if install_methods is None:
install_methods = [tools.CondaPackage(TOOL_NAME, version=TOOL_VERSION, executable='Gap2Seq')]
tools.Tool.__init__(self, install_methods=install_methods)
install_methods = [tools.PrexistingUnixCommand(shutil.which(TOOL_NAME), require_executability=True)]
super(Gap2SeqTool, self).__init__(install_methods=install_methods)

def version(self):
return TOOL_VERSION
return None

def execute(self, args): # pylint: disable=W0221
tool_cmd = [self.install_and_get_path()] + list(args)
Expand Down
14 changes: 9 additions & 5 deletions assemble/mafft.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
import util.misc
import os
import os.path
import shutil
import subprocess

TOOL_NAME = "mafft"
TOOL_VERSION = '7.464'

_log = logging.getLogger(__name__)

Expand All @@ -24,12 +24,16 @@ class MafftTool(tools.Tool):

def __init__(self, install_methods=None):
if install_methods is None:
install_methods = []
install_methods.append(tools.CondaPackage(TOOL_NAME, version=TOOL_VERSION))
tools.Tool.__init__(self, install_methods=install_methods)
install_methods = [tools.PrexistingUnixCommand(shutil.which(TOOL_NAME), require_executability=True)]
super(MafftTool, self).__init__(install_methods=install_methods)

def version(self):
return TOOL_VERSION
if self.tool_version is None:
self._get_tool_version()
return self.tool_version

def _get_tool_version(self):
self.tool_version = subprocess.check_output([self.install_and_get_path(), '--version']).decode('UTF-8').strip().split()[0]

def __seqIdsAreAllUnique(self, filePath, inputFormat="fasta"):
seqIds = []
Expand Down
17 changes: 10 additions & 7 deletions assemble/mummer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
import os
import os.path
import random
import shutil
import subprocess
import Bio.SeqIO

TOOL_NAME = "mummer4"
tool_version = '4.0.0beta2'
TOOL_NAME = "mummer"

log = logging.getLogger(__name__)

Expand All @@ -23,13 +23,16 @@ class MummerTool(tools.Tool):

def __init__(self, install_methods=None):
if install_methods is None:
install_methods = [
tools.CondaPackage(TOOL_NAME, executable="mummer", version=tool_version)
]
tools.Tool.__init__(self, install_methods=install_methods)
install_methods = [tools.PrexistingUnixCommand(shutil.which(TOOL_NAME), require_executability=True)]
super(MummerTool, self).__init__(install_methods=install_methods)

def version(self):
return tool_version
if self.tool_version is None:
self._get_tool_version()
return self.tool_version

def _get_tool_version(self):
self.tool_version = subprocess.check_output([self.install_and_get_path(), '-version']).decode('UTF-8').strip()

def executable_path(self):
exec_path = tools.Tool.executable_path(self)
Expand Down
15 changes: 9 additions & 6 deletions assemble/muscle.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@

import os
import os.path
import shutil
import subprocess
import logging

TOOL_NAME = "muscle"
TOOL_VERSION = '3.8.1551'
CONDA_TOOL_VERSION = '3.8.1551'

_log = logging.getLogger(__name__)

Expand All @@ -24,12 +23,16 @@ class MuscleTool(tools.Tool):

def __init__(self, install_methods=None):
if install_methods is None:
install_methods = []
install_methods.append(tools.CondaPackage(TOOL_NAME, version=CONDA_TOOL_VERSION))
tools.Tool.__init__(self, install_methods=install_methods)
install_methods = [tools.PrexistingUnixCommand(shutil.which(TOOL_NAME), require_executability=True)]
super(MuscleTool, self).__init__(install_methods=install_methods)

def version(self):
return TOOL_VERSION
if self.tool_version is None:
self._get_tool_version()
return self.tool_version

def _get_tool_version(self):
self.tool_version = subprocess.check_output([self.install_and_get_path(), '-version']).decode('UTF-8').strip().split()[1]

# pylint: disable=W0221
def execute(
Expand Down
15 changes: 9 additions & 6 deletions assemble/spades.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
import util.file
import util.misc

TOOL_NAME = 'spades'
TOOL_VERSION = '3.12.0'
TOOL_NAME = 'spades.py'

log = logging.getLogger(__name__)

Expand All @@ -29,12 +28,16 @@ class SpadesTool(tools.Tool):

def __init__(self, install_methods=None):
if install_methods is None:
install_methods = [tools.CondaPackage(TOOL_NAME, version=TOOL_VERSION, executable='spades.py',
verifycmd='spades.py --version')]
tools.Tool.__init__(self, install_methods=install_methods)
install_methods = [tools.PrexistingUnixCommand(shutil.which(TOOL_NAME), require_executability=True)]
super(SpadesTool, self).__init__(install_methods=install_methods)

def version(self):
return TOOL_VERSION
if self.tool_version is None:
self._get_tool_version()
return self.tool_version

def _get_tool_version(self):
self.tool_version = subprocess.check_output([self.install_and_get_path(), '--version']).decode('UTF-8').strip().split()[1]

def execute(self, args): # pylint: disable=W0221
tool_cmd = [self.install_and_get_path()] + list(map(str, args))
Expand Down
11 changes: 4 additions & 7 deletions assemble/trinity.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
import tools
import util.misc

TOOL_NAME = "trinity"
TOOL_VERSION = "2011-11-26"
CONDA_TOOL_VERSION = "date.2011_11_26" # conda versions cannot have hyphens...
TOOL_NAME = "Trinity"

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -51,12 +49,11 @@ class TrinityTool(tools.Tool):

def __init__(self, install_methods=None):
if install_methods is None:
install_methods = []
install_methods.append(tools.CondaPackage(TOOL_NAME, executable="Trinity", version=CONDA_TOOL_VERSION))
tools.Tool.__init__(self, install_methods=install_methods)
install_methods = [tools.PrexistingUnixCommand(shutil.which(TOOL_NAME), require_executability=True)]
super(TrinityTool, self).__init__(install_methods=install_methods)

def version(self):
return TOOL_VERSION
return None

def execute(self,
inFastq1,
Expand Down

0 comments on commit 03750b3

Please sign in to comment.