Passed
Push — master ( a47e0a...19735b )
by Marcin
04:27
created

xxdownload_job_and_process   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 39
Duplicated Lines 30.77 %

Importance

Changes 0
Metric Value
eloc 22
dl 12
loc 39
rs 10
c 0
b 0
f 0
wmc 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A get_parser() 12 12 1

How to fix   Duplicated Code   

Duplicated Code

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():
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
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