Skip to content
Snippets Groups Projects
Commit 6a80c032 authored by hmueller's avatar hmueller
Browse files

Implement simple storage of query sequence names. Currently relies on resolution of issue #22.

parent f67b0373
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3 #!/usr/bin/env python3
import env import env
import argparse import argparse
import json
from psot import config from psot import config
from os import system, makedirs from os import system, makedirs
...@@ -22,3 +23,15 @@ system(hmmscan_tool + ...@@ -22,3 +23,15 @@ system(hmmscan_tool +
" --domtblout " + args.output + "/domtblout.tsv " + " --domtblout " + args.output + "/domtblout.tsv " +
" --pfamtblout " + args.output + "/pfamtblout.tsv " + " --pfamtblout " + args.output + "/pfamtblout.tsv " +
args.database + " " + args.fasta) args.database + " " + args.fasta)
# Provide a list of all query sequence names for conversion process
queries = []
with open(args.fasta) as f:
for line in f:
if line.startswith('>'):
queries.append(line.replace('>', '').strip())
query_file = args.output + '/' + 'queries.json'
with open(query_file, 'w') as o:
json.dump(queries, o)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment