Esempio n. 1
0
def setUp():
    """
    Set up the test Flask app.
    """
    global _app
    frontend.configure(baseConfig="TestConfig")
    _app = frontend.app.test_client()
Esempio n. 2
0
    def setUpClass(cls):
        # silence usually unhelpful CORS log
        logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL)

        cls.numReferenceSets = 5
        cls.numReferencesPerReferenceSet = 3
        cls.numAlignmentsPerReadGroup = 2
        config = {
            "DATA_SOURCE":
            "__SIMULATED__",
            "SIMULATED_BACKEND_RANDOM_SEED":
            1111,
            "SIMULATED_BACKEND_NUM_CALLS":
            0,
            "SIMULATED_BACKEND_VARIANT_DENSITY":
            1.0,
            "SIMULATED_BACKEND_NUM_VARIANT_SETS":
            10,
            "SIMULATED_BACKEND_NUM_REFERENCE_SETS":
            cls.numReferenceSets,
            "SIMULATED_BACKEND_NUM_REFERENCES_PER_REFERENCE_SET":
            cls.numReferencesPerReferenceSet,
            "SIMULATED_BACKEND_NUM_ALIGNMENTS_PER_READ_GROUP":
            cls.numAlignmentsPerReadGroup,
        }
        frontend.reset()
        frontend.configure(baseConfig="TestConfig", extraConfig=config)
        cls.app = frontend.app.test_client()
Esempio n. 3
0
    def setUpClass(cls):
        config = {
            "DATA_SOURCE": "simulated://",
            "SIMULATED_BACKEND_RANDOM_SEED": 1111,
            "SIMULATED_BACKEND_NUM_CALLS": 1,
            "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0,
            "SIMULATED_BACKEND_NUM_VARIANT_SETS": 1,
            # "DEBUG" : True
        }
        frontend.reset()
        frontend.configure(baseConfig="TestConfig", extraConfig=config)
        cls.app = frontend.app.test_client()
        # silence usually unhelpful CORS log
        logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL)

        # example test values
        cls.backend = frontend.app.backend
        cls.referenceSet = cls.backend.getReferenceSets()[0]
        cls.referenceSetId = cls.referenceSet.getId()
        cls.reference = cls.referenceSet.getReferences()[0]
        cls.referenceId = cls.reference.getId()
        cls.dataset = cls.backend.getDatasets()[0]
        cls.datasetId = cls.dataset.getId()
        cls.variantSet = cls.dataset.getVariantSets()[0]
        cls.variantSetId = cls.variantSet.getId()
        gaVariant = cls.variantSet.getVariants("1", 0, 2**32).next()
        cls.variantId = gaVariant.id
        cls.callSet = cls.variantSet.getCallSets()[0]
        cls.callSetId = cls.callSet.getId()
        cls.readGroupSet = cls.dataset.getReadGroupSets()[0]
        cls.readGroupSetId = cls.readGroupSet.getId()
        cls.readGroup = cls.readGroupSet.getReadGroups()[0]
        cls.readGroupId = cls.readGroup.getId()
        cls.readAlignment = cls.readGroup.getReadAlignments().next()
        cls.readAlignmentId = cls.readAlignment.id
Esempio n. 4
0
 def setUpClass(cls):
     config = {
         "DATA_SOURCE": paths.testDataRepo,
         "DEBUG": False
     }
     frontend.reset()
     frontend.configure(
         baseConfig="DevelopmentConfig", extraConfig=config)
     cls.app = frontend.app.test_client()
Esempio n. 5
0
    def setUpClass(cls):
        config = {
            "DATA_SOURCE": "simulated://",
            "SIMULATED_BACKEND_RANDOM_SEED": 1111,
            "SIMULATED_BACKEND_NUM_CALLS": 1,
            "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0,
            "SIMULATED_BACKEND_NUM_VARIANT_SETS": 1,
            "LANDING_MESSAGE_HTML": paths.landingMessageHtml
            # "DEBUG" : True
        }
        frontend.reset()
        frontend.configure(
            baseConfig="TestConfig", extraConfig=config)
        cls.app = frontend.app.test_client()
        # silence usually unhelpful CORS log
        logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL)

        # example test values
        cls.backend = frontend.app.backend
        cls.dataRepo = cls.backend.getDataRepository()
        cls.referenceSet = cls.dataRepo.getReferenceSets()[0]
        cls.referenceSetId = cls.referenceSet.getId()
        cls.reference = cls.referenceSet.getReferences()[0]
        cls.referenceId = cls.reference.getId()
        cls.dataset = cls.backend.getDataRepository().getDatasets()[0]
        cls.datasetId = cls.dataset.getId()
        cls.variantSet = cls.dataset.getVariantSets()[0]
        cls.variantSetId = cls.variantSet.getId()
        gaVariant = cls.variantSet.getVariants("1", 0, 2**32).next()
        cls.variantId = gaVariant.id
        cls.callSet = cls.variantSet.getCallSets()[0]
        cls.callSetId = cls.callSet.getId()
        cls.readGroupSet = cls.dataset.getReadGroupSets()[0]
        cls.readGroupSetId = cls.readGroupSet.getId()
        cls.readGroup = cls.readGroupSet.getReadGroups()[0]
        cls.readGroupId = cls.readGroup.getId()
        cls.readAlignment = cls.readGroup.getReadAlignments().next()
        cls.readAlignmentId = cls.readAlignment.id
        cls.phenotypeAssociationSet = \
            cls.dataset.getPhenotypeAssociationSets()[0]
        cls.phenotypeAssociationSetId = cls.phenotypeAssociationSet.getId()
        cls.association = cls.phenotypeAssociationSet.getAssociations()[0]
        cls.phenotype = cls.association.phenotype
        cls.phenotypeId = cls.phenotype.id
        cls.featureSets = cls.dataset.getFeatureSets()
        cls.genotypePhenotype = cls.phenotypeAssociationSet.getAssociations(
            request=None, featureSets=cls.featureSets)[0]
        cls.genotypePhenotypeId = cls.genotypePhenotype.id
        cls.rnaQuantificationSet = cls.dataset.getRnaQuantificationSets()[0]
        cls.rnaQuantificationSetId = cls.rnaQuantificationSet.getId()
        cls.rnaQuantification = cls.rnaQuantificationSet.getRnaQuantifications(
            )[0]
        cls.rnaQuantificationId = cls.rnaQuantification.getId()
        cls.expressionLevel = cls.rnaQuantification.getExpressionLevels(
            1, 2)[0]
        cls.expressionLevelId = cls.expressionLevel.getId()
Esempio n. 6
0
File: cli.py Progetto: afirth/server
def server_main(parser=None):
    if parser is None:
        parser = argparse.ArgumentParser(
            description="GA4GH reference server")
    addGlobalOptions(parser)
    args = parser.parse_args()
    frontend.configure(args.config_file, args.config)
    frontend.app.run(
        host="0.0.0.0", port=args.port,
        use_reloader=not args.dont_use_reloader)
Esempio n. 7
0
def server_main(parser=None):
    if parser is None:
        parser = argparse.ArgumentParser(
            description="GA4GH reference server")
    addGlobalOptions(parser)
    args = parser.parse_args()
    frontend.configure(args.config_file, args.config)
    frontend.app.run(
        host="0.0.0.0", port=args.port,
        use_reloader=not args.dont_use_reloader)
Esempio n. 8
0
 def setUpClass(cls):
     config = {
         "DATA_SOURCE": "__SIMULATED__",
         "SIMULATED_BACKEND_RANDOM_SEED": 1111,
         "SIMULATED_BACKEND_NUM_CALLS": 0,
         "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0,
         "SIMULATED_BACKEND_NUM_VARIANT_SETS": 10,
     }
     frontend.configure(baseConfig="TestConfig", extraConfig=config)
     cls.app = frontend.app.test_client()
Esempio n. 9
0
 def setUpClass(cls):
     config = {
         "DATA_SOURCE": paths.testDataRepo,
         "DEBUG": False
     }
     logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL)
     frontend.reset()
     frontend.configure(
         baseConfig="TestConfig", extraConfig=config)
     cls.app = frontend.app.test_client()
Esempio n. 10
0
    def setUpClass(cls):
        config = {
            "DATA_SOURCE": "simulated://",
            "SIMULATED_BACKEND_RANDOM_SEED": 1111,
            "SIMULATED_BACKEND_NUM_CALLS": 1,
            "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0,
            "SIMULATED_BACKEND_NUM_VARIANT_SETS": 1,
            "LANDING_MESSAGE_HTML": paths.landingMessageHtml
            # "DEBUG" : True
        }
        frontend.reset()
        frontend.configure(baseConfig="TestConfig", extraConfig=config)
        cls.app = frontend.app.test_client()
        # silence usually unhelpful CORS log
        logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL)

        # example test values
        cls.backend = frontend.app.backend
        cls.dataRepo = cls.backend.getDataRepository()
        cls.referenceSet = cls.dataRepo.getReferenceSets()[0]
        cls.referenceSetId = cls.referenceSet.getId()
        cls.reference = cls.referenceSet.getReferences()[0]
        cls.referenceId = cls.reference.getId()
        cls.dataset = cls.backend.getDataRepository().getDatasets()[0]
        cls.datasetId = cls.dataset.getId()
        cls.variantSet = cls.dataset.getVariantSets()[0]
        cls.variantSetId = cls.variantSet.getId()
        gaVariant = cls.variantSet.getVariants("1", 0, 2**32).next()
        cls.variantId = gaVariant.id
        cls.callSet = cls.variantSet.getCallSets()[0]
        cls.callSetId = cls.callSet.getId()
        cls.readGroupSet = cls.dataset.getReadGroupSets()[0]
        cls.readGroupSetId = cls.readGroupSet.getId()
        cls.readGroup = cls.readGroupSet.getReadGroups()[0]
        cls.readGroupId = cls.readGroup.getId()
        cls.readAlignment = cls.readGroup.getReadAlignments().next()
        cls.readAlignmentId = cls.readAlignment.id
        cls.phenotypeAssociationSet = \
            cls.dataset.getPhenotypeAssociationSets()[0]
        cls.phenotypeAssociationSetId = cls.phenotypeAssociationSet.getId()
        cls.association = cls.phenotypeAssociationSet.getAssociations()[0]
        cls.phenotype = cls.association.phenotype
        cls.phenotypeId = cls.phenotype.id
        cls.featureSets = cls.dataset.getFeatureSets()
        cls.genotypePhenotype = cls.phenotypeAssociationSet.getAssociations(
            request=None, featureSets=cls.featureSets)[0]
        cls.genotypePhenotypeId = cls.genotypePhenotype.id
        cls.rnaQuantificationSet = cls.dataset.getRnaQuantificationSets()[0]
        cls.rnaQuantificationSetId = cls.rnaQuantificationSet.getId()
        cls.rnaQuantification = cls.rnaQuantificationSet.getRnaQuantifications(
        )[0]
        cls.rnaQuantificationId = cls.rnaQuantification.getId()
        cls.expressionLevel = cls.rnaQuantification.getExpressionLevels(1,
                                                                        2)[0]
        cls.expressionLevelId = cls.expressionLevel.getId()
Esempio n. 11
0
def setUp(self):
    config = {
        "DATA_SOURCE": "__SIMULATED__",
        "SIMULATED_BACKEND_RANDOM_SEED": 1111,
        "SIMULATED_BACKEND_NUM_CALLS": 0,
        "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0,
        "SIMULATED_BACKEND_NUM_VARIANT_SETS": 10,
    }
    frontend.configure(
        baseConfig="TestConfig", extraConfig=config)
    global _app
    _app = frontend.app.test_client()
Esempio n. 12
0
def server_main(parser=None):
    if parser is None:
        parser = argparse.ArgumentParser(
            description="GA4GH reference server")
    addGlobalOptions(parser)
    args = parser.parse_args()
    frontend.configure(args.config_file, args.config, args.port)
    sslContext = None
    if args.tls or ("OIDC_PROVIDER" in frontend.app.config):
        sslContext = "adhoc"
    frontend.app.run(
        host="0.0.0.0", port=args.port,
        use_reloader=not args.dont_use_reloader, ssl_context=sslContext)
Esempio n. 13
0
def server_main(args=None):
    parser = getServerParser()
    parsedArgs = parser.parse_args(args)
    if parsedArgs.disable_urllib_warnings:
        requests.packages.urllib3.disable_warnings()
    frontend.configure(parsedArgs.config_file, parsedArgs.config,
                       parsedArgs.port)
    sslContext = None
    if parsedArgs.tls or ("OIDC_PROVIDER" in frontend.app.config):
        sslContext = "adhoc"
    frontend.app.run(host=parsedArgs.host,
                     port=parsedArgs.port,
                     use_reloader=not parsedArgs.dont_use_reloader,
                     ssl_context=sslContext)
Esempio n. 14
0
def server_main(args=None):
    parser = getServerParser()
    parsedArgs = parser.parse_args(args)
    if parsedArgs.disable_urllib_warnings:
        requests.packages.urllib3.disable_warnings()
    frontend.configure(
        parsedArgs.config_file, parsedArgs.config, parsedArgs.port)
    sslContext = None
    if parsedArgs.tls or ("OIDC_PROVIDER" in frontend.app.config):
        sslContext = "adhoc"
    frontend.app.run(
        host=parsedArgs.host, port=parsedArgs.port,
        use_reloader=not parsedArgs.dont_use_reloader,
        ssl_context=sslContext)
Esempio n. 15
0
 def setUpClass(cls):
     config = {
         "DATA_SOURCE": "__SIMULATED__",
         "SIMULATED_BACKEND_RANDOM_SEED": 1111,
         "SIMULATED_BACKEND_NUM_CALLS": 1,
         "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0,
         "SIMULATED_BACKEND_NUM_VARIANT_SETS": 1,
         # "DEBUG" : True
     }
     frontend.reset()
     frontend.configure(baseConfig="TestConfig", extraConfig=config)
     cls.app = frontend.app.test_client()
     # silence usually unhelpful CORS log
     logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL)
Esempio n. 16
0
def server_main(parser=None):
    if parser is None:
        parser = argparse.ArgumentParser(description="GA4GH reference server")
    # Add global options
    parser.add_argument("--port",
                        "-P",
                        default=8000,
                        type=int,
                        help="The port to listen on")
    parser.add_argument("--config",
                        "-C",
                        default='DefaultConfig',
                        type=str,
                        help="The configuration to use")
    parser.add_argument("--config-file",
                        "-F",
                        type=str,
                        help="The configuration file to use")

    subparsers = parser.add_subparsers(title='subcommands', )

    # help
    helpParser = subparsers.add_parser("help",
                                       description="ga4gh_server help",
                                       help="show this help message and exit")
    # Wormtable backend
    wtbParser = subparsers.add_parser(
        "wormtable",
        description="Serve the API using a wormtable based backend.",
        help="Serve data from tables.")
    wtbParser.add_argument(
        "dataDir",
        help="The directory containing the wormtables to be served.")
    wtbParser.set_defaults(variantSetClass=variants.WormtableVariantSet)
    # Tabix
    tabixParser = subparsers.add_parser(
        "tabix",
        description="Serve the API using a tabix based backend.",
        help="Serve data from Tabix indexed VCFs")
    tabixParser.add_argument("dataDir", help="The directory containing VCFs")
    tabixParser.set_defaults(variantSetClass=variants.TabixVariantSet)

    args = parser.parse_args()
    if "variantSetClass" not in args:
        parser.print_help()
    else:
        frontend.configure(args.config, args.config_file)
        frontend.app.backend = backend.Backend(args.dataDir,
                                               args.variantSetClass)
        frontend.app.run(host="0.0.0.0", port=args.port, debug=True)
Esempio n. 17
0
def server_main(parser=None):
    if parser is None:
        parser = argparse.ArgumentParser(
            description="GA4GH reference server")
    # Add global options
    parser.add_argument(
        "--port", "-P", default=8000, type=int,
        help="The port to listen on")
    parser.add_argument(
        "--config", "-C", default='DefaultConfig', type=str,
        help="The configuration to use")
    parser.add_argument(
        "--config-file", "-F", type=str,
        help="The configuration file to use")

    subparsers = parser.add_subparsers(title='subcommands',)

    # help
    subparsers.add_parser(
        "help",
        description="ga4gh_server help",
        help="show this help message and exit")
    # Wormtable backend
    wtbParser = subparsers.add_parser(
        "wormtable",
        description="Serve the API using a wormtable based backend.",
        help="Serve data from tables.")
    wtbParser.add_argument(
        "dataDir",
        help="The directory containing the wormtables to be served.")
    wtbParser.set_defaults(variantSetClass=variants.WormtableVariantSet)
    # Tabix
    tabixParser = subparsers.add_parser(
        "tabix",
        description="Serve the API using a tabix based backend.",
        help="Serve data from Tabix indexed VCFs")
    tabixParser.add_argument(
        "dataDir",
        help="The directory containing VCFs")
    tabixParser.set_defaults(variantSetClass=variants.TabixVariantSet)

    args = parser.parse_args()
    if "variantSetClass" not in args:
        parser.print_help()
    else:
        frontend.configure(args.config, args.config_file)
        frontend.app.backend = backend.Backend(
            args.dataDir, args.variantSetClass)
        frontend.app.run(host="0.0.0.0", port=args.port, debug=True)
Esempio n. 18
0
 def setUpClass(cls):
     config = {
         "DATA_SOURCE": "__SIMULATED__",
         "SIMULATED_BACKEND_RANDOM_SEED": 1111,
         "SIMULATED_BACKEND_NUM_CALLS": 1,
         "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0,
         "SIMULATED_BACKEND_NUM_VARIANT_SETS": 1,
         "OIDC_CLIENT_ID": "123",
         "OIDC_CLIENT_SECRET": RANDSTR,
         "OIDC_PROVIDER": "http://auth.com"
         # "DEBUG" : True
     }
     frontend.reset()
     frontend.configure(baseConfig="TestOidcConfig", extraConfig=config, port=8001)
     cls.app = frontend.app.test_client()
Esempio n. 19
0
def server_main(parser=None):
    if parser is None:
        parser = argparse.ArgumentParser(description="GA4GH reference server")
    addServerOptions(parser)
    args = parser.parse_args()
    if args.disable_urllib_warnings:
        requests.packages.urllib3.disable_warnings()
    frontend.configure(args.config_file, args.config, args.port)
    sslContext = None
    if args.tls or ("OIDC_PROVIDER" in frontend.app.config):
        sslContext = "adhoc"
    frontend.app.run(host=args.host,
                     port=args.port,
                     use_reloader=not args.dont_use_reloader,
                     ssl_context=sslContext)
Esempio n. 20
0
 def setUpClass(cls):
     config = {
         "DATA_SOURCE": "__SIMULATED__",
         "SIMULATED_BACKEND_RANDOM_SEED": 1111,
         "SIMULATED_BACKEND_NUM_CALLS": 1,
         "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0,
         "SIMULATED_BACKEND_NUM_VARIANT_SETS": 1,
         "OIDC_CLIENT_ID": "123",
         "OIDC_CLIENT_SECRET": RANDSTR,
         "OIDC_PROVIDER": "http://auth.com"
         # "DEBUG" : True
     }
     frontend.reset()
     frontend.configure(
         baseConfig="TestOidcConfig", extraConfig=config, port=8001)
     cls.app = frontend.app.test_client()
Esempio n. 21
0
def server_main(parser=None):
    if parser is None:
        parser = argparse.ArgumentParser(
            description="GA4GH reference server")
    addServerOptions(parser)
    args = parser.parse_args()
    if args.disable_urllib_warnings:
        requests.packages.urllib3.disable_warnings()
    frontend.configure(
        args.config_file, args.config, args.port)
    sslContext = None
    if args.tls or ("OIDC_PROVIDER" in frontend.app.config):
        sslContext = "adhoc"
    frontend.app.run(
        host=args.host, port=args.port,
        use_reloader=not args.dont_use_reloader, ssl_context=sslContext)
Esempio n. 22
0
    def setUpClass(cls):
        config = {
            "DATA_SOURCE": "__SIMULATED__",
            "SIMULATED_BACKEND_RANDOM_SEED": 1111,
            "SIMULATED_BACKEND_NUM_CALLS": 1,
            "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0,
            "SIMULATED_BACKEND_NUM_VARIANT_SETS": 1,
            # "DEBUG" : True
        }
        frontend.reset()
        frontend.configure(
            baseConfig="TestConfig", extraConfig=config)
        cls.app = frontend.app.test_client()
        # silence usually unhelpful CORS log
        logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL)

        # example test values
        cls.backend = frontend.app.backend
Esempio n. 23
0
 def setUpClass(cls):
     # silence usually unhelpful CORS log
     logging.getLogger("ga4gh.frontend.cors").setLevel(logging.CRITICAL)
     # Set the random seed to make tests reproducible.
     random.seed(1)
     config = {
         "DATA_SOURCE": "__SIMULATED__",
         "SIMULATED_BACKEND_RANDOM_SEED": 1111,
         "SIMULATED_BACKEND_NUM_CALLS": 5,
         "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0,
         "SIMULATED_BACKEND_NUM_VARIANT_SETS": 4,
         "SIMULATED_BACKEND_NUM_REFERENCE_SETS": 3,
         "SIMULATED_BACKEND_NUM_REFERENCES_PER_REFERENCE_SET": 4,
         "SIMULATED_BACKEND_NUM_ALIGNMENTS_PER_READ_GROUP": 5,
     }
     frontend.reset()
     frontend.configure(baseConfig="TestConfig", extraConfig=config)
     cls.app = frontend.app.test_client()
Esempio n. 24
0
 def setUpClass(cls):
     # silence usually unhelpful CORS log
     logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL)
     # Set the random seed to make tests reproducible.
     random.seed(1)
     config = {
         "DATA_SOURCE": "simulated://",
         "SIMULATED_BACKEND_RANDOM_SEED": 1111,
         "SIMULATED_BACKEND_NUM_CALLS": 5,
         "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0,
         "SIMULATED_BACKEND_NUM_VARIANT_SETS": 4,
         "SIMULATED_BACKEND_NUM_REFERENCE_SETS": 3,
         "SIMULATED_BACKEND_NUM_REFERENCES_PER_REFERENCE_SET": 4,
         "SIMULATED_BACKEND_NUM_ALIGNMENTS_PER_READ_GROUP": 5
     }
     frontend.reset()
     frontend.configure(baseConfig="TestConfig", extraConfig=config)
     cls.app = frontend.app.test_client()
Esempio n. 25
0
    def setUpClass(cls):
        config = {
            "DATA_SOURCE": "simulated://",
            "SIMULATED_BACKEND_RANDOM_SEED": 1111,
            "SIMULATED_BACKEND_NUM_CALLS": 1,
            "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0,
            "SIMULATED_BACKEND_NUM_VARIANT_SETS": 1,
            # "DEBUG" : True
        }
        frontend.reset()
        frontend.configure(
            baseConfig="TestConfig", extraConfig=config)
        cls.app = frontend.app.test_client()
        # silence usually unhelpful CORS log
        logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL)

        # example test values
        cls.backend = frontend.app.backend
        cls.dataRepo = cls.backend.getDataRepository()
        cls.referenceSet = cls.dataRepo.getReferenceSets()[0]
        cls.referenceSetId = cls.referenceSet.getId()
        cls.reference = cls.referenceSet.getReferences()[0]
        cls.referenceId = cls.reference.getId()
        cls.dataset = cls.backend.getDataRepository().getDatasets()[0]
        cls.datasetId = cls.dataset.getId()
        cls.variantSet = cls.dataset.getVariantSets()[0]
        cls.variantSetId = cls.variantSet.getId()
        gaVariant = cls.variantSet.getVariants("1", 0, 2**32).next()
        cls.variantId = gaVariant.id
        cls.callSet = cls.variantSet.getCallSets()[0]
        cls.callSetId = cls.callSet.getId()
        cls.readGroupSet = cls.dataset.getReadGroupSets()[0]
        cls.readGroupSetId = cls.readGroupSet.getId()
        cls.readGroup = cls.readGroupSet.getReadGroups()[0]
        cls.readGroupId = cls.readGroup.getId()
        cls.readAlignment = cls.readGroup.getReadAlignments().next()
        cls.readAlignmentId = cls.readAlignment.id
Esempio n. 26
0
 def setUp(self):
     frontend.configure("TestConfig")
     frontend.app.backend = backend.MockBackend()
     self.app = frontend.app.test_client()
Esempio n. 27
0
 def setUpClass(cls):
     frontend.reset()
     frontend.configure(baseConfig="TestConfig")
     frontend.app.log_exception = mock.Mock()
Esempio n. 28
0
 def setUpClass(cls):
     frontend.reset()
     frontend.configure(baseConfig="TestConfig")
     cls.app = frontend.app.test_client()
Esempio n. 29
0
 def setUp(self):
     frontend.configure("TestConfig")
     frontend.app.backend = backend.MockBackend()
     self.app = frontend.app.test_client()
Esempio n. 30
0
 def setUpClass(cls):
     frontend.reset()
     frontend.configure(baseConfig="TestConfig")
     cls.app = frontend.app.test_client()
Esempio n. 31
0
 def setUpClass(cls):
     frontend.reset()
     frontend.configure(baseConfig="TestConfig")
Esempio n. 32
0
 def setUpClass(cls):
     config = {"DATA_SOURCE": paths.testDataRepo, "DEBUG": False}
     frontend.reset()
     frontend.configure(baseConfig="DevelopmentConfig", extraConfig=config)
     cls.app = frontend.app.test_client()
Esempio n. 33
0
 def setUpClass(cls):
     reload(frontend)
     frontend.configure(baseConfig="TestConfig")
     cls.app = frontend.app.test_client()
Esempio n. 34
0
 def setUpClass(cls):
     frontend.reset()
     frontend.configure(baseConfig="TestConfig")