How to use the msprime.cli.get_msp_parser function in msprime

To help you get started, we’ve selected a few msprime examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tskit-dev / msprime / tests / test_cli.py View on Github external
def test_newick_long_args(self):
        parser = cli.get_msp_parser()
        cmd = "newick"
        tree_sequence = "test.trees"
        args = parser.parse_args([
            cmd, tree_sequence, "--precision=5"])
        self.assertEqual(args.tree_sequence, tree_sequence)
        self.assertEqual(args.precision, 5)
github tskit-dev / msprime / tests / test_cli.py View on Github external
def test_mutations_short_args(self):
        parser = cli.get_msp_parser()
        cmd = "mutations"
        tree_sequence = "test.trees"
        args = parser.parse_args([cmd, tree_sequence, "-p", "4"])
        self.assertEqual(args.tree_sequence, tree_sequence)
        self.assertEqual(args.precision, 4)
github tskit-dev / msprime / tests / test_cli.py View on Github external
def test_vcf_default_values(self):
        parser = cli.get_msp_parser()
        cmd = "vcf"
        tree_sequence = "test.trees"
        args = parser.parse_args([cmd, tree_sequence])
        self.assertEqual(args.tree_sequence, tree_sequence)
        self.assertEqual(args.ploidy, 1)
github tskit-dev / msprime / tests / test_cli.py View on Github external
def test_sites_default_values(self):
        parser = cli.get_msp_parser()
        cmd = "sites"
        tree_sequence = "test.trees"
        args = parser.parse_args([cmd, tree_sequence])
        self.assertEqual(args.tree_sequence, tree_sequence)
        self.assertEqual(args.precision, 6)
github tskit-dev / msprime / tests / test_cli.py View on Github external
def test_edges_short_args(self):
        parser = cli.get_msp_parser()
        cmd = "edges"
        tree_sequence = "test.trees"
        args = parser.parse_args([cmd, tree_sequence, "-p", "8"])
        self.assertEqual(args.tree_sequence, tree_sequence)
        self.assertEqual(args.precision, 8)
github tskit-dev / msprime / tests / test_cli.py View on Github external
def test_nodes_long_args(self):
        parser = cli.get_msp_parser()
        cmd = "nodes"
        tree_sequence = "test.trees"
        args = parser.parse_args([
            cmd, tree_sequence, "--precision", "5"])
        self.assertEqual(args.tree_sequence, tree_sequence)
        self.assertEqual(args.precision, 5)
github tskit-dev / msprime / tests / test_cli.py View on Github external
def test_simulate_default_values(self):
        parser = cli.get_msp_parser()
        cmd = "simulate"
        args = parser.parse_args([cmd, "10", "out.trees"])
        self.assertEqual(args.sample_size, 10)
        self.assertEqual(args.tree_sequence, "out.trees")
        self.assertEqual(args.recombination_rate, 0.0)
        self.assertEqual(args.mutation_rate, 0.0)
        self.assertEqual(args.length, 1)
        self.assertEqual(args.effective_population_size, 1)
        self.assertEqual(args.random_seed, None)
        self.assertEqual(args.compress, False)
github tskit-dev / msprime / tests / test_cli.py View on Github external
def test_provenances_short_args(self):
        parser = cli.get_msp_parser()
        cmd = "provenances"
        tree_sequence = "test.trees"
        args = parser.parse_args([cmd, tree_sequence, "-H"])
        self.assertEqual(args.tree_sequence, tree_sequence)
        self.assertEqual(args.human, True)
github tskit-dev / msprime / tests / test_cli.py View on Github external
def test_macs_default_values(self):
        parser = cli.get_msp_parser()
        cmd = "macs"
        tree_sequence = "test2.trees"
        args = parser.parse_args([cmd, tree_sequence])
        self.assertEqual(args.tree_sequence, tree_sequence)
github tskit-dev / msprime / tests / test_cli.py View on Github external
def test_mutations_long_args(self):
        parser = cli.get_msp_parser()
        cmd = "mutations"
        tree_sequence = "test.trees"
        args = parser.parse_args([cmd, tree_sequence, "--precision", "9"])
        self.assertEqual(args.tree_sequence, tree_sequence)
        self.assertEqual(args.precision, 9)