Skip to content

Commit

Permalink
fixing [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
davidebolo1993 committed Aug 7, 2023
1 parent 5ccf144 commit 04f4dde
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
5 changes: 3 additions & 2 deletions cosigt_smk/workflow/rules/pggb.smk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ rule pggb:
pggb
'''
input:
rules.pgrtk_get_seq.output,
fasta=rules.pgrtk_get_seq.output,
index=rules.faidx.output
output:
'results/pggb/{region}.og'
threads:
Expand All @@ -18,7 +19,7 @@ rule pggb:
shell:
'''
pggb \
-i {input} \
-i {input.fasta} \
-o {params.prefix} \
-p 90 \
-s 5k \
Expand Down
25 changes: 24 additions & 1 deletion cosigt_smk/workflow/rules/pgrtk.smk
Original file line number Diff line number Diff line change
@@ -1,16 +1,39 @@
rule pgrtk_get_seq:
'''
run pgrtk api
'''
input:
agc=config['agc'],
region=lambda wildcards: glob('resources/regions/{region}.bed'.format(region=wildcards.region))
output:
'results/pgrtk/{region}.fa'
threads:
1
config['pgrtk']['threads']
container:
'docker://davidebolo1993/graph_genotyper:latest'
params:
padding=config['pgrtk']['padding']
resources:
mem_mb=config['pgrtk']['mem_mb'],
time=config['pgrtk']['time']
shell:
'''
python workflow/scripts/pypgrtk.py {input.agc} {input.region} {params.padding} {output}
'''

rule faidx:
'''
samtools faidx
'''
input:
rules.pgrtk_get_seq.output
output:
'results/pgrtk/{region}.fa.fai'
threads:
1
container:
'docker://davidebolo1993/graph_genotyper:latest'
shell:
'''
samtools faidx {input}
'''
4 changes: 3 additions & 1 deletion cosigt_smk/workflow/scripts/organize.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def default_parameters(args):
#pgrtk
d['pgrtk']=dict()
d['pgrtk']['padding'] = args.pgrtk_padding
d['pgrtk']['threads'] = args.pgrtk_threads
d['pgrtk']['mem_mb'] = args.pgrtk_memory
d['pgrtk']['time'] = double_quote(args.pgrtk_time)

Expand Down Expand Up @@ -134,12 +135,13 @@ def main():

#pgrtk
metrics.add_argument('--pgrtk_padding', help='padding (#bps) - pgrtk commands [100000]',type=int, default=100000)
metrics.add_argument('--pgrtk_threads', help='threads - pgrtk commands [10]',type=int, default=10)
metrics.add_argument('--pgrtk_time', help='max time (hh:mm:ss) - pgrtk commands ["00:05:00"]',type=str, default='00:05:00')
metrics.add_argument('--pgrtk_memory', help='max memory (mb) - samtools (view/sort) commands [30000]',type=int, default=30000)

#pggb
metrics.add_argument('--pggb_threads', help='threads - pggb command [32]',type=int, default=32)
metrics.add_argument('--pggb_time', help='max time (hh:mm:ss) - odgi (build) commands ["00:15:00"]',type=str, default='00:15:00')
metrics.add_argument('--pggb_time', help='max time (hh:mm:ss) - odgi (build) commands ["00:25:00"]',type=str, default='00:25:00')
metrics.add_argument('--pggb_memory', help='max memory (mb) - odgi (build) commands [5000]',type=int, default=5000)

args = parser.parse_args()
Expand Down

0 comments on commit 04f4dde

Please sign in to comment.