예제 #1
0
 def test_count_sequences(self):
     '''Check that count_sequences does as expected'''
     self.assertEqual(
         2,
         tasks.count_sequences(
             os.path.join(data_dir, 'sequences_test_good_file.fq')))
     self.assertEqual(
         4,
         tasks.count_sequences(os.path.join(data_dir, 'sequences_test.fa')))
     self.assertEqual(
         0,
         tasks.count_sequences(
             os.path.join(data_dir, 'sequences_test_empty_file')))
예제 #2
0
def run(description):
    parser = argparse.ArgumentParser(
        description = 'Prints the number of sequences in input file to stdout',
        usage = 'fastaq count_sequences <infile>')
    parser.add_argument('infile', help='Name of input file')
    options = parser.parse_args()
    print(tasks.count_sequences(options.infile))
예제 #3
0
 def test_count_sequences(self):
     '''Check that count_sequences does as expected'''
     self.assertEqual(2, tasks.count_sequences(os.path.join(data_dir, 'sequences_test_good_file.fq')))
     self.assertEqual(4, tasks.count_sequences(os.path.join(data_dir, 'sequences_test.fa')))
     self.assertEqual(0, tasks.count_sequences(os.path.join(data_dir, 'sequences_test_empty_file')))