Esempio n. 1
0
def run(description):
    parser = argparse.ArgumentParser(
        description = 'Makes all combinations of sequences in input file by using all possibilities of redundant bases. e.g. ART could be AAT or AGT. Assumes input is nucleotides, not amino acids',
        usage = 'fastaq expand_nucleotides <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.expand_nucleotides(
        options.infile,
        options.outfile,
    )
Esempio n. 2
0
 def test_expand_nucleoties(self):
     '''Test expand_nucleotides'''
     tmp = 'tmp.expanded'
     fq_in = os.path.join(data_dir, 'tasks_test_expend_nucleotides.in.fq')
     fa_in = os.path.join(data_dir, 'tasks_test_expend_nucleotides.in.fa')
     fq_expected = os.path.join(data_dir, 'tasks_test_expend_nucleotides.out.fq')
     fa_expected = os.path.join(data_dir, 'tasks_test_expend_nucleotides.out.fa')
     tasks.expand_nucleotides(fq_in, tmp)
     self.assertTrue(filecmp.cmp(fq_expected, tmp, shallow=False))
     os.unlink(tmp)
     tasks.expand_nucleotides(fa_in, tmp)
     self.assertTrue(filecmp.cmp(fa_expected, tmp, shallow=False))
     os.unlink(tmp)
Esempio n. 3
0
 def test_expand_nucleoties(self):
     '''Test expand_nucleotides'''
     tmp = 'tmp.expanded'
     fq_in = os.path.join(data_dir, 'tasks_test_expend_nucleotides.in.fq')
     fa_in = os.path.join(data_dir, 'tasks_test_expend_nucleotides.in.fa')
     fq_expected = os.path.join(data_dir, 'tasks_test_expend_nucleotides.out.fq')
     fa_expected = os.path.join(data_dir, 'tasks_test_expend_nucleotides.out.fa')
     tasks.expand_nucleotides(fq_in, tmp)
     self.assertTrue(filecmp.cmp(fq_expected, tmp, shallow=False))
     os.unlink(tmp)
     tasks.expand_nucleotides(fa_in, tmp)
     self.assertTrue(filecmp.cmp(fa_expected, tmp, shallow=False))
     os.unlink(tmp)