Skip to content

Commit

Permalink
add stix query script
Browse files Browse the repository at this point in the history
  • Loading branch information
mchowdh200 committed Jul 7, 2022
1 parent 8b98282 commit e6c24f6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions scripts/construct_queries.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Construct the -l and -r region strings from the vcf
regions/confidence intervals separated by a tab.
Includes SVTYPE of query in final column.
"""
import sys
import pysam
Expand Down
20 changes: 19 additions & 1 deletion stix_1kg_dels.smk
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,26 @@ rule ConstructQueries:
"""
input: config.vcf
output: f'{config.outdir}/queries.txt'
threads: workflow.cores
threads: 1
conda: 'envs/pysam.yaml'
shell:
'python scripts/construct_queries.py {input} DEL > {output}'


rule StixQuery:
"""
TODO run on just a handfull of regions before kicking off the full job
Parse the queries file with gargs to run stix queries in parallel
"""
input: rules.ConstructQueries.output
output: f'{config.outdir}/query_results.txt'
threads: workflow.cores
shell:
f"""
bash scripts/stix_query.sh \\
-q {{input}} \\
-i {config.stix_index} \\
-d {config.stix_db} \\
-t {{threads}} \\
> {{output}}
"""

0 comments on commit e6c24f6

Please sign in to comment.