Total Complexity | 1 |
Total Lines | 39 |
Duplicated Lines | 30.77 % |
Changes | 0 |
Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
1 | #!/usr/bin/env python |
||
2 | # -*- coding: utf-8 -*- |
||
3 | """ |
||
4 | Caution: the file was changed, it does not download now from simrnaweb. |
||
5 | """ |
||
6 | from __future__ import print_function |
||
7 | import os |
||
8 | |||
9 | import argparse |
||
10 | |||
11 | View Code Duplication | def get_parser(): |
|
|
|||
12 | parser = argparse.ArgumentParser( |
||
13 | description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) |
||
14 | |||
15 | #parser.add_argument('-', "--", help="", default="") |
||
16 | |||
17 | parser.add_argument("-v", "--verbose", |
||
18 | action="store_true", help="be verbose") |
||
19 | parser.add_argument('--dir', action="store_false") |
||
20 | parser.add_argument("rna", help="", default="evox.py -c ade") |
||
21 | parser.add_argument("simrnawebid", help="", default="") |
||
22 | return parser |
||
23 | |||
24 | |||
25 | if __name__ == '__main__': |
||
26 | parser = get_parser() |
||
27 | args = parser.parse_args() |
||
28 | |||
29 | dir = 'simrna_' + args.simrnawebid |
||
30 | os.system('mkdir ' + dir) |
||
31 | os.chdir(dir) |
||
32 | #os.system('rna_simrnaweb_download_job.py --prefix tar --web-models ' + args.simrnawebid) |
||
33 | #os.system('rna_simrnaweb_download_job.py -n 200 --web-models -w ' + args.simrnawebid) |
||
34 | os.system('mkdir reps') |
||
35 | #os.system('mkdir reps_ns') |
||
36 | os.system('cp *.pdb reps') |
||
37 | #os.system('cp *.pdb reps_ns') |
||
38 | os.system('evox.py -c ' + args.rna) |
||
39 |