コード例 #1
0
ファイル: test_faidx.py プロジェクト: mdshw5/pyfaidx
 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))
コード例 #2
0
 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))
コード例 #3
0
 def test_fetch_whole_file(self):
     main(['data/genes.fasta'])
コード例 #4
0
 def test_short_line_lengths(self):
     main(['data/genes.fasta', '--bed', 'data/malformed.bed'])
コード例 #5
0
 def test_not_regexp_multi(self):
     main(['data/genes.fasta', '-g', 'XR', '-g', 'XM', '-v'])
コード例 #6
0
 def test_regexp(self):
     main(['data/genes.fasta', '-g', 'XR'])
コード例 #7
0
ファイル: test_faidx.py プロジェクト: mdshw5/pyfaidx
 def test_not_regexp_multi(self):
     main(['data/genes.fasta', '-g', 'XR', '-g', 'XM', '-v'])
コード例 #8
0
ファイル: test_faidx.py プロジェクト: mdshw5/pyfaidx
 def test_regexp(self):
     main(['data/genes.fasta', '-g', 'XR'])
コード例 #9
0
ファイル: test_faidx.py プロジェクト: mdshw5/pyfaidx
 def test_key_warning(self):
     main(['data/genes.fasta', 'foo'])
コード例 #10
0
ファイル: test_faidx.py プロジェクト: mdshw5/pyfaidx
 def test_fetch_error(self):
     main(['data/genes.fasta', 'gi|557361099|gb|KF435150.1|:1-1000'])
コード例 #11
0
ファイル: test_faidx.py プロジェクト: mdshw5/pyfaidx
 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')
コード例 #12
0
ファイル: test_faidx.py プロジェクト: mdshw5/pyfaidx
 def test_fetch_whole_file(self):
     main(['data/genes.fasta'])
コード例 #13
0
ファイル: test_faidx.py プロジェクト: mdshw5/pyfaidx
 def test_short_line_lengths(self):
     main(['data/genes.fasta', '--bed', 'data/malformed.bed'])
コード例 #14
0
from pyfaidx.cli import main

if __name__ == '__main__':
    main()