Commit 1c531d81 authored by hmueller's avatar hmueller
Browse files

Reduce code redundancy.

parent b5762dd7
......@@ -6,12 +6,12 @@ from os import system
targetp_tool = config.load_config()['tools'].get('targetp', 'targetp')
org_flags = {'plant': '-P', 'non-plant': '-N'}
parser = argparse.ArgumentParser(description = 'Determine subcellular locations of eukaryotic amino acid sequences')
parser.add_argument('--fasta', '-f', required = True, help = 'A fasta file with amino acid sequences')
parser.add_argument('--organism_group', choices = ['plant', 'non-plant'], required = True, help = 'Define wether to use plant/non-plant networks')
parser.add_argument('--organism_group', choices = org_flags.keys(), required = True, help = 'Define wether to use plant/non-plant networks')
parser.add_argument('--output', required = True, help = 'The output file')
args = parser.parse_args()
org_flags = {'plant': '-P', 'non-plant': '-N'}
system(targetp_tool + " " + org_flags[args.organism_group] + " " + args.fasta + " > " + args.output)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment