Commit d47a4529 authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Added configuration file for the whole system

parent a6cb14bf
#!/usr/bin/env python3
import argparse
import yaml
import os
from os import system
def get_config_file():
"""Finds the config file, that is located in the directory above script"""
script_path = os.path.realpath(__file__)
script_dir = os.path.dirname(script_path)
config_dir = os.path.dirname(script_dir)
config_file = os.path.join(config_dir, 'config.yaml')
return config_file
def get_signalp_tool():
"""Extracts the configuration entry for signalp. If it is not present, it defaults to signalp"""
tool = None
with open(get_config_file()) as f:
config = yaml.load(f)
tool = config['tools'].get('signalp', 'signalp')
return tool
parser = argparse.ArgumentParser(description='Find signal peptides in amino acid sequences')
parser.add_argument('--fasta', '-f', required=True, help='A fasta file with aminoacid sequences')
parser.add_argument('--organism', '-o', choices=['euk', 'gram+', 'gram-'], default='euk', help='The organism type')
args = parser.parse_args()
system("/vol/biotools/bin/signalp -t " + args.organism + " " + args.fasta)
system(get_signalp_tool() + " -t " + args.organism + " " + args.fasta)
tools:
signalp: '/vol/biotools/bin/signalp'
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