예제 #1
0
def run(description):
    parser = argparse.ArgumentParser(
        description = description,
        usage = 'fastaq replace_bases <infile> <outfile> <old> <new>')
    parser.add_argument('infile', help='Name of input file')
    parser.add_argument('outfile', help='Name of output file')
    parser.add_argument('old', help='Base to be replaced')
    parser.add_argument('new', help='Replace with this letter')
    options = parser.parse_args()
    tasks.replace_bases(options.infile, options.outfile, options.old, options.new)
예제 #2
0
def run(description):
    parser = argparse.ArgumentParser(
        description=description,
        usage='fastaq replace_bases <infile> <outfile> <old> <new>')
    parser.add_argument('infile', help='Name of input file')
    parser.add_argument('outfile', help='Name of output file')
    parser.add_argument('old', help='Base to be replaced')
    parser.add_argument('new', help='Replace with this letter')
    options = parser.parse_args()
    tasks.replace_bases(options.infile, options.outfile, options.old,
                        options.new)
예제 #3
0
 def test_sequences_replace_bases(self):
     '''Check that fasta file gets all bases replaced OK'''
     tmpfile = 'tmp.replace_bases.fa'
     tasks.replace_bases(
         os.path.join(data_dir, 'sequences_test_fastaq_replace_bases.fa'),
         tmpfile, 'T', 'X')
     self.assertTrue(
         filecmp.cmp(
             os.path.join(
                 data_dir,
                 'sequences_test_fastaq_replace_bases.expected.fa'),
             tmpfile))
     os.unlink(tmpfile)
예제 #4
0
 def test_sequences_replace_bases(self):
     '''Check that fasta file gets all bases replaced OK'''
     tmpfile = 'tmp.replace_bases.fa'
     tasks.replace_bases(os.path.join(data_dir, 'sequences_test_fastaq_replace_bases.fa'), tmpfile, 'T', 'X')
     self.assertTrue(filecmp.cmp(os.path.join(data_dir, 'sequences_test_fastaq_replace_bases.expected.fa'), tmpfile))
     os.unlink(tmpfile)