def runTests():
    separator = "----------------------"
    path = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..',
                        'client_dev.py')
    baseUrl = "https://localhost:8000/current"
    key = getKey()
    keyStr = "--key {0}".format(key)
    workarounds = ""
    minimalOutput = "-O"
    commands = ["readgroupsets-search "]
    for command in commands:
        cmdStr = """
            python {path} {keyStr} {minimalOutput} {workarounds}
            {command} {baseUrl}
            """
        cmdDict = {
            "path": path,
            "command": command,
            "workarounds": workarounds,
            "keyStr": keyStr,
            "baseUrl": baseUrl,
            "minimalOutput": minimalOutput,
        }
        cmd = cmdStr.format(**cmdDict)
        splits = shlex.split(cmd)
        cleanCmd = ' '.join(splits)
        utils.log(separator)
        utils.log(cleanCmd)
        utils.log(separator)
        utils.runCommandSplits(splits)
示例#2
0
 def _convertAvro(self, avdlFile):
     args = ["java", "-jar", self.avroJar, "idl2schemata", avdlFile]
     if self.verbosity > 0:
         utils.log("converting {}".format(avdlFile))
     if self.verbosity > 1:
         utils.log("running: {}".format(" ".join(args)))
     if self.verbosity > 1:
         utils.runCommandSplits(args)
     else:
         utils.runCommandSplits(args, silent=True)
示例#3
0
 def convertAvro(self, avdlFile):
     """
     Converts the specified avdl file using the java tools.
     """
     args = ["java", "-jar", self.avroJar, "idl2schemata", avdlFile]
     if self.verbosity > 0:
         utils.log("converting {}".format(avdlFile))
     if self.verbosity > 1:
         utils.log("running: {}".format(" ".join(args)))
     if self.verbosity > 1:
         utils.runCommandSplits(args)
     else:
         utils.runCommandSplits(args, silent=True)
示例#4
0
 def convertAvro(self, avdlFile):
     """
     Converts the specified avdl file using the java tools.
     """
     args = ["java", "-jar", self.avroJar, "idl2schemata", avdlFile]
     if self.verbosity > 0:
         utils.log("converting {}".format(avdlFile))
     if self.verbosity > 1:
         utils.log("running: {}".format(" ".join(args)))
     if self.verbosity > 1:
         utils.runCommandSplits(args)
     else:
         utils.runCommandSplits(args, silent=True)
示例#5
0
def runTests():
    separator = "----------------------"
    path = os.path.join(
        os.path.abspath(os.path.dirname(__file__)),
        '..', 'client_dev.py')
    baseUrl = "https://www.googleapis.com/genomics/v1beta2"
    key = getKey()
    keyStr = "--key {0}".format(key)
    workarounds = "--workarounds=google"
    minimalOutput = "-O"
    commands = [
        "variants-search --variantSetIds 10473108253681171589 "
        "--referenceName 22 --start 51005491 --end 51005492 --pageSize 1",
        "references-list-bases --id EIaSo62VtfXT4AE --start 15000 "
        "--end 15010",
        "referencesets-get --id EMud_c37lKPXTQ",
        "references-get --id EIaSo62VtfXT4AE",
        "variantsets-search --datasetIds 10473108253681171589",
        "referencesets-search --accessions GCA_000001405.15",
        "references-search --md5checksums 1b22b98cdeb4a9304cb5d48026a85128",
        "readgroupsets-search --datasetIds 10473108253681171589 "
        "--name NA12878 --pageSize 1",
        "callsets-search --variantSetIds 10473108253681171589 "
        "--name HG00261 --pageSize 1",
        "reads-search --start 51005353 --end 51005354 --readGroupIds "
        "ChhDTXZuaHBLVEZoQ2JpT2J1enZtN25Pb0IQAA --referenceName "
        "22 --pageSize 1",
    ]
    for command in commands:
        cmdStr = """
            python {path} {keyStr} {minimalOutput} {workarounds}
            {command} {baseUrl}
            """
        cmdDict = {
            "path": path,
            "command": command,
            "workarounds": workarounds,
            "keyStr": keyStr,
            "baseUrl": baseUrl,
            "minimalOutput": minimalOutput,
        }
        cmd = cmdStr.format(**cmdDict)
        splits = shlex.split(cmd)
        cleanCmd = ' '.join(splits)
        utils.log(separator)
        utils.log(cleanCmd)
        utils.log(separator)
        utils.runCommandSplits(splits)
def runTests():
    separator = "----------------------"
    path = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..',
                        'client_dev.py')
    baseUrl = "https://www.googleapis.com/genomics/v1beta2"
    key = getKey()
    keyStr = "--key {0}".format(key)
    workarounds = "--workarounds=google"
    minimalOutput = "-O"
    commands = [
        "variants-search --variantSetIds 10473108253681171589 "
        "--referenceName 22 --start 51005491 --end 51005492 --pageSize 1",
        "references-list-bases --id EIaSo62VtfXT4AE --start 15000 "
        "--end 15010",
        "referencesets-get --id EMud_c37lKPXTQ",
        "references-get --id EIaSo62VtfXT4AE",
        "variantsets-search --datasetIds 10473108253681171589",
        "referencesets-search --accessions GCA_000001405.15",
        "references-search --md5checksums 1b22b98cdeb4a9304cb5d48026a85128",
        "readgroupsets-search --datasetIds 10473108253681171589 "
        "--name NA12878 --pageSize 1",
        "callsets-search --variantSetIds 10473108253681171589 "
        "--name HG00261 --pageSize 1",
        "reads-search --start 51005353 --end 51005354 --readGroupIds "
        "ChhDTXZuaHBLVEZoQ2JpT2J1enZtN25Pb0IQAA --referenceName "
        "22 --pageSize 1",
    ]
    for command in commands:
        cmdStr = """
            python {path} {keyStr} {minimalOutput} {workarounds}
            {command} {baseUrl}
            """
        cmdDict = {
            "path": path,
            "command": command,
            "workarounds": workarounds,
            "keyStr": keyStr,
            "baseUrl": baseUrl,
            "minimalOutput": minimalOutput,
        }
        cmd = cmdStr.format(**cmdDict)
        splits = shlex.split(cmd)
        cleanCmd = ' '.join(splits)
        utils.log(separator)
        utils.log(cleanCmd)
        utils.log(separator)
        utils.runCommandSplits(splits)