コード例 #1
0
 def test_trim(self):
     '''trim should correctly trim each seq in a file'''
     tmp = 'tmp.trim.fq'
     tasks.trim(os.path.join(data_dir, 'sequences_test_untrimmed.fq'), tmp,
                2, 1)
     self.assertTrue(
         filecmp.cmp(os.path.join(data_dir, 'sequences_test_trimmed.fq'),
                     tmp))
     os.unlink(tmp)
コード例 #2
0
ファイル: trim_ends.py プロジェクト: martinghunt/Fastaq
def run(description):
    parser = argparse.ArgumentParser(
        description = description,
        usage = 'fastaq trim_ends <infile> <bases off start> <bases off end> <outfile>')
    parser.add_argument('infile', help='Name of input file')
    parser.add_argument('start_trim', type=int, help='Number of bases to trim off start')
    parser.add_argument('end_trim', type=int, help='Number of bases to trim off end')
    parser.add_argument('outfile', help='Name of output file')
    options = parser.parse_args()
    tasks.trim(options.infile, options.outfile, options.start_trim, options.end_trim)
コード例 #3
0
ファイル: trim_ends.py プロジェクト: jhh130910/code-test
def run(description):
    parser = argparse.ArgumentParser(
        description=description,
        usage=
        'fastaq trim_ends <infile> <bases off start> <bases off end> <outfile>'
    )
    parser.add_argument('infile', help='Name of input file')
    parser.add_argument('start_trim',
                        type=int,
                        help='Number of bases to trim off start')
    parser.add_argument('end_trim',
                        type=int,
                        help='Number of bases to trim off end')
    parser.add_argument('outfile', help='Name of output file')
    options = parser.parse_args()
    tasks.trim(options.infile, options.outfile, options.start_trim,
               options.end_trim)
コード例 #4
0
ファイル: tasks_test.py プロジェクト: martinghunt/Fastaq
 def test_trim(self):
     '''trim should correctly trim each seq in a file'''
     tmp = 'tmp.trim.fq'
     tasks.trim(os.path.join(data_dir, 'sequences_test_untrimmed.fq'), tmp, 2, 1)
     self.assertTrue(filecmp.cmp(os.path.join(data_dir, 'sequences_test_trimmed.fq'), tmp))
     os.unlink(tmp)