Commit 222f3972 authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Added a database configuration parameter to the blast wrapper. Renamed the files.

parent 82e52112
......@@ -6,19 +6,15 @@ from os import system
blastp_tool = config.load_config()['tools'].get('blastp', 'blastp')
parser = argparse.ArgumentParser(description='Identify homologues in the swissprot database')
parser.add_argument('--info', '-i', action='store_true')
parser.add_argument('--fasta', '-f', required=True, help='A fasta file with aminoacid sequences')
parser.add_argument('--database', '-d', required=True, help='Database to search in')
parser.add_argument('--output', '-o', required=True, help='The result file')
parser.add_argument('--evalue', '-e', default='0.0001', help='Evalue cutoff')
parser.add_argument('--alignment', '-a', action='store_true', help='Include alignments in btop format')
args = parser.parse_args()
if args.info:
print("blast against swissprot\n")
exit(0)
format = '7 qseqid sseqid pident qstart qend sstart send evalue bitscore'
if args.alignment:
format += ' btop'
system(blastp_tool + " -db /vol/biodb/uniprot/uniprot_sprot.fasta -num_threads 7 -outfmt '" + format + "' -out " + args.output + " -query " + args.fasta)
system(blastp_tool + " -db " + args.database + " -num_threads 7 -outfmt '" + format + "' -out " + args.output + " -query " + args.fasta)
......@@ -8,8 +8,12 @@ name: 'blastp_swissprot'
info: 'blastp analysis against swissprot'
# The name of the script for the analysis step. Must take a --fasta parameter
analysis_script: 'module_blast_swissprot.py'
analysis_script: 'run_blastp.py'
# The name of the result to json converter script. Must take one parameter, the
# result file from the analysis_script
converter_script: 'convert_blast_swissprot.py'
converter_script: 'convert_blastp.py'
parameters:
database: '/vol/biodb/uniprot/uniprot_sprot.fasta'
evalue: 1e-10
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