def __init__(self, path=None, license_path=None):
        self.tool_version = None
        install_methods = []
        for novopath in [path, os.environ.get('NOVOALIGN_PATH')]:
            if novopath is not None:
                install_methods.append(
                    tools.PrexistingUnixCommand(os.path.join(
                        novopath, TOOL_NAME),
                                                require_executability=True))
        install_methods.append(
            tools.PrexistingUnixCommand(shutil.which(TOOL_NAME),
                                        require_executability=True))

        post_verify_command = None
        for novo_license_path in [
                license_path,
                os.environ.get("NOVOALIGN_LICENSE_PATH"), ''
        ]:
            if novo_license_path is not None and os.path.isfile(
                    novo_license_path):
                # called relative to the conda bin/ directory
                uname = os.uname()
                # we ideally want the "update" copy operation
                # but only GNU cp has it. On OSX, the license will be copied each time.
                if uname[0] == 'Darwin':
                    copy_operation = ''
                else:
                    copy_operation = '-u'

                post_verify_command = "cp {copy_operation} {lic_path} ./".format(
                    copy_operation=copy_operation, lic_path=novo_license_path)
                break  # if we've found a license file, stop looking

        #install_methods.append(tools.CondaPackage(TOOL_NAME, version=TOOL_VERSION, post_verify_command=post_verify_command))
        tools.Tool.__init__(self, install_methods=install_methods)
 def __init__(self, install_methods=None):
     if install_methods is None:
         install_methods = [
             tools.PrexistingUnixCommand(shutil.which(TOOL_NAME),
                                         verifycmd='tbl2asn --help')
         ]
     tools.Tool.__init__(self, install_methods=install_methods)
 def __init__(self, install_methods=None):
     if not install_methods:
         install_methods = []
         install_methods.append(
             tools.PrexistingUnixCommand(shutil.which('kraken2'),
                                         require_executability=False))
     super(Kraken2, self).__init__(install_methods=install_methods)
Exemple #4
0
 def __init__(self, install_methods=None):
     if install_methods is None:
         install_methods = [
             tools.PrexistingUnixCommand(shutil.which(TOOL_NAME),
                                         require_executability=True)
         ]
     super(MafftTool, self).__init__(install_methods=install_methods)
Exemple #5
0
 def __init__(self, install_methods=None):
     if install_methods is None:
         path = _get_vphaser2_path()
         install_methods = []
         install_methods.append(tools.CondaPackage(TOOL_NAME, version=TOOL_VERSION))
         install_methods.append(tools.PrexistingUnixCommand(path))
     tools.Tool.__init__(self, install_methods=install_methods)
Exemple #6
0
 def __init__(self, install_methods=None, extra_genomes=None):
     self.jvmMemDefault = '4g'
     if not install_methods:
         install_methods = [tools.PrexistingUnixCommand(shutil.which(TOOL_NAME), require_executability=True)]
     self.known_dbs = set()
     self.installed_dbs = set()
     super(SnpEff, self).__init__(install_methods=install_methods)
Exemple #7
0
 def __init__(self, install_methods=None):
     if install_methods is None:
         install_methods = [
             tools.PrexistingUnixCommand(shutil.which('cd-hit'),
                                         require_executability=True)
         ]
     super(CdHit, self).__init__(install_methods=install_methods)
Exemple #8
0
    def __init__(self, install_methods=None):
        if install_methods is None:
            install_methods = [
                tools.PrexistingUnixCommand(shutil.which(TOOL_NAME),
                                            require_executability=False)
            ]

        tools.Tool.__init__(self, install_methods=install_methods)
Exemple #9
0
 def __init__(self, path=None):
     self.tool_version = None
     install_methods = []
     for jarpath in [path, os.environ.get('GATK_PATH')]:
         if jarpath:
             if not jarpath.endswith('.jar'):
                 jarpath = os.path.join(jarpath, 'GenomeAnalysisTK.jar')
             install_methods.append(
                 tools.PrexistingUnixCommand(
                     jarpath,
                     verifycmd='java -jar %s --version &> /dev/null' %
                     jarpath,
                     verifycode=0,
                     require_executability=False))
     install_methods.append(
         tools.PrexistingUnixCommand(shutil.which(TOOL_NAME),
                                     require_executability=True))
     tools.Tool.__init__(self, install_methods=install_methods)
Exemple #10
0
 def __init__(self, path=None):
     self.tool_version = None
     install_methods = []
     for novopath in [path, os.environ.get('NOVOALIGN_PATH'), '']:
         if novopath is not None:
             install_methods.append(
                 tools.PrexistingUnixCommand(os.path.join(
                     novopath, 'novoalign'),
                                             require_executability=True))
     install_methods.append(
         tools.CondaPackage(TOOL_NAME, version=TOOL_VERSION))
     tools.Tool.__init__(self, install_methods=install_methods)
Exemple #11
0
    def __init__(self, path=None):
        self.tool_version = None
        for megan_path in [path, os.environ.get('MEGAN_PATH')]:
            if not megan_path:
                continue
            if os.path.isdir(megan_path):
                megan_path = os.path.join(megan_path, 'MEGAN')
            install_methods = [
                tools.PrexistingUnixCommand(
                    megan_path,
                    verifycmd='{} -h > /dev/null'.format(megan_path),
                    verifycode=0,
                    require_executability=True)
            ]

        self.license_file = os.environ.get('MEGAN_LICENSE_PATH')
        self.data_dir = os.environ.get('MEGAN_DATA_PATH')

        super(Megan, self).__init__(install_methods=install_methods)
Exemple #12
0
 def __init__(self, install_methods=None):
     if not install_methods:
         install_methods = [
             tools.PrexistingUnixCommand(shutil.which('ktImportTaxonomy'))
         ]
     super(Krona, self).__init__(install_methods=install_methods)
Exemple #13
0
 def __init__(self, install_methods=None):
     if not install_methods:
         install_methods = [
             tools.PrexistingUnixCommand(shutil.which('diamond'))
         ]
     super(Diamond, self).__init__(install_methods=install_methods)
 def __init__(self, install_methods=None):
     self.subtool_name = self.subtool_name if hasattr(self, "subtool_name") else "kraken"
     if not install_methods:
         install_methods = [tools.PrexistingUnixCommand(shutil.which(self.subtool_name), require_executability=False)]
     super(Kraken, self).__init__(install_methods=install_methods)
Exemple #15
0
 def __init__(self, install_methods=None):
     self.subtool_name = self.subtool_name if hasattr(self, "subtool_name") else "bmtagger.sh"
     if install_methods is None:
         install_methods = []
         install_methods = [tools.PrexistingUnixCommand(shutil.which(self.subtool_name), require_executability=False)]
     tools.Tool.__init__(self, install_methods=install_methods)
Exemple #16
0
 def __init__(self, install_methods=None):
     if install_methods is None:
         install_methods = [
             tools.PrexistingUnixCommand(shutil.which(TOOL_NAME))
         ]
     tools.Tool.__init__(self, install_methods=install_methods)
Exemple #17
0
 def __init__(self, install_methods=None):
     if install_methods is None:
         install_methods = []
         install_methods.append(tools.PrexistingUnixCommand(shutil.which(TOOL_NAME), require_executability=True))
     super(Minimap2, self).__init__(install_methods=install_methods)