예제 #1
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))
예제 #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
 def test_not_regexp_multi(self):
     main(['data/genes.fasta', '-g', 'XR', '-g', 'XM', '-v'])
예제 #8
0
 def test_regexp(self):
     main(['data/genes.fasta', '-g', 'XR'])
예제 #9
0
 def test_key_warning(self):
     main(['data/genes.fasta', 'foo'])
예제 #10
0
 def test_fetch_error(self):
     main(['data/genes.fasta', 'gi|557361099|gb|KF435150.1|:1-1000'])
예제 #11
0
 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
 def test_fetch_whole_file(self):
     main(['data/genes.fasta'])
예제 #13
0
 def test_short_line_lengths(self):
     main(['data/genes.fasta', '--bed', 'data/malformed.bed'])
from pyfaidx.cli import main

if __name__ == '__main__':
    main()