Пример #1
0
def run(description):
    parser = argparse.ArgumentParser(
        description = 'Trims any Ns off each sequence in input file. Does nothing to gaps in the middle, just trims the ends',
        usage = 'fastaq trim_Ns_at_end <infile> <outfile>')
    parser.add_argument('infile', help='Name of input file')
    parser.add_argument('outfile', help='Name of output file')
    options = parser.parse_args()
    tasks.trim_Ns_at_end(options.infile, options.outfile)
Пример #2
0
 def test_trim_Ns_at_end(self):
     '''Test Ns at ends of sequences trimmed OK'''
     tmp = 'tmp.trim.fa'
     tasks.trim_Ns_at_end(
         os.path.join(data_dir, 'sequences_test_trim_Ns_at_end.fa'), tmp)
     self.assertTrue(
         filecmp.cmp(
             os.path.join(data_dir,
                          'sequences_test_trim_Ns_at_end.fa.trimmed'), tmp))
     os.unlink(tmp)
Пример #3
0
 def test_trim_Ns_at_end(self):
     '''Test Ns at ends of sequences trimmed OK'''
     tmp = 'tmp.trim.fa'
     tasks.trim_Ns_at_end(os.path.join(data_dir, 'sequences_test_trim_Ns_at_end.fa'), tmp)
     self.assertTrue(filecmp.cmp(os.path.join(data_dir, 'sequences_test_trim_Ns_at_end.fa.trimmed'), tmp))
     os.unlink(tmp)