How to use the pyfaidx.cli.main function in pyfaidx

To help you get started, we’ve selected a few pyfaidx 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 mdshw5 / pyfaidx / tests / test_faidx.py View on Github external
def test_fetch_whole_file(self):
        main(['data/genes.fasta'])
github mdshw5 / pyfaidx / tests / test_faidx.py View on Github external
def test_regexp(self):
        main(['data/genes.fasta', '-g', 'XR'])
github mdshw5 / pyfaidx / tests / test_faidx.py View on Github external
def test_not_regexp_multi(self):
        main(['data/genes.fasta', '-g', 'XR', '-g', 'XM', '-v'])
github mdshw5 / pyfaidx / tests / test_faidx.py View on Github external
def test_split_entry(self):
        main(['--split-files', 'data/genes.fasta', 'gi|557361099|gb|KF435150.1|'])
        assert os.path.exists('gi557361099gbKF435150.1.fasta')
        os.remove('gi557361099gbKF435150.1.fasta')
github mdshw5 / pyfaidx / tests / test_faidx.py View on Github external
def test_key_warning(self):
        main(['data/genes.fasta', 'foo'])
github mdshw5 / pyfaidx / tests / test_faidx.py View on Github external
def test_short_line_lengths(self):
        main(['data/genes.fasta', '--bed', 'data/malformed.bed'])
github mdshw5 / pyfaidx / tests / test_faidx.py View on Github external
def test_auto_strand(self):
        """ Test that --auto-strand produces the same output as --reverse --complement"""
        with NamedTemporaryFile() as auto_strand:
            with NamedTemporaryFile() as noto_strand:
                main(['--auto-strand', '-o', auto_strand.name, 'data/genes.fasta', 'gi|557361099|gb|KF435150.1|:100-1'])
                main(['--reverse', '--complement', '-o', noto_strand.name, 'data/genes.fasta', 'gi|557361099|gb|KF435150.1|:1-100'])
                print(auto_strand.read())
                print()
                print(noto_strand.read())
                self.assertTrue(filecmp.cmp(auto_strand.name, noto_strand.name))
github mdshw5 / pyfaidx / tests / test_faidx.py View on Github external
def test_not_regexp(self):
        main(['data/genes.fasta', '-g', 'XR','-v'])
github mdshw5 / pyfaidx / tests / test_faidx.py View on Github external
def test_fetch_error(self):
        main(['data/genes.fasta', 'gi|557361099|gb|KF435150.1|:1-1000'])