Пример #1
0
 def test_mikado_config(self):
     namespace = Namespace(default=False)
     namespace.scoring = None
     namespace.intron_range = None
     namespace.reference = ""
     namespace.external = None
     namespace.mode = ["permissive"]
     namespace.threads = 1
     namespace.blast_targets = []
     namespace.junctions = []
     out = os.path.join(tempfile.gettempdir(), "configuration.yaml")
     with open(out, "w") as out_handle:
         namespace.out = out_handle
         Mikado.subprograms.configure.create_config(namespace)
     self.assertGreater(os.stat(out).st_size, 0)
     conf = Mikado.configuration.configurator.to_json(out)
     conf = Mikado.configuration.configurator.check_json(conf)
     conf = Mikado.configuration.configurator.check_json(conf)
     os.remove(out)
Пример #2
0
 def test_mikado_config(self):
     namespace = Namespace(default=False)
     namespace.scoring = None
     namespace.intron_range = None
     namespace.reference = ""
     namespace.external = None
     namespace.mode = ["permissive"]
     namespace.threads = 1
     namespace.blast_targets = []
     namespace.junctions = []
     out = os.path.join(tempfile.gettempdir(), "configuration.yaml")
     with open(out, "w") as out_handle:
         namespace.out = out_handle
         Mikado.subprograms.configure.create_config(namespace)
     self.assertGreater(os.stat(out).st_size, 0)
     conf = Mikado.configuration.configurator.to_json(out)
     conf = Mikado.configuration.configurator.check_json(conf)
     conf = Mikado.configuration.configurator.check_json(conf)
     os.remove(out)
Пример #3
0
    def test_daijin_config(self):

        # Check the basic function actually functions
        _ = daijin_configurator.create_daijin_base_config()

        namespace = Namespace(default=False)
        namespace.r1 = []
        namespace.r2 = []
        namespace.samples = []
        namespace.strandedness = []
        namespace.asm_methods = []
        namespace.aligners = []
        namespace.modes = ["nosplit"]
        namespace.cluster_config = None
        namespace.scheduler = ""
        namespace.flank = None
        namespace.intron_range = None
        namespace.prot_db = []
        namespace.genome = self.__genomefile__.name
        namespace.transcriptome = ""
        namespace.name = "Daijin"
        namespace.out_dir = tempfile.gettempdir()
        namespace.threads = 1

        namespace.scoring = random.choice(
            pkg_resources.resource_listdir("Mikado.configuration",
                                           "scoring_files"))

        out = os.path.join(tempfile.gettempdir(), "configuration.yaml")
        with open(out, "wt") as out_handle:
            namespace.out = out_handle
            daijin_configurator.create_daijin_config(namespace, level="ERROR")
        self.assertGreater(os.stat(out).st_size, 0)

        with open(out) as out_handle:
            config = yaml.load(out_handle)

        daijin_configurator.check_config(config)
Пример #4
0
    def test_daijin_config(self):

        # Check the basic function actually functions
        _ = daijin_configurator.create_daijin_base_config()

        namespace = Namespace(default=False)
        namespace.r1 = []
        namespace.r2 = []
        namespace.samples = []
        namespace.strandedness = []
        namespace.asm_methods = []
        namespace.aligners = []
        namespace.modes = ["nosplit"]
        namespace.cluster_config = None
        namespace.scheduler = ""
        namespace.flank = None
        namespace.intron_range = None
        namespace.prot_db = []
        namespace.genome = self.__genomefile__.name
        namespace.transcriptome = ""
        namespace.name = "Daijin"
        namespace.out_dir = tempfile.gettempdir()
        namespace.threads = 1

        namespace.scoring = random.choice(
            pkg_resources.resource_listdir("Mikado.configuration", "scoring_files"))

        out = os.path.join(tempfile.gettempdir(), "configuration.yaml")
        with open(out, "wt") as out_handle:
            namespace.out = out_handle
            daijin_configurator.create_daijin_config(namespace, level="ERROR")
        self.assertGreater(os.stat(out).st_size, 0)

        with open(out) as out_handle:
            config = yaml.load(out_handle)

        daijin_configurator.check_config(config)