Skip to content

Commit

Permalink
increase resources for fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
CChahrour committed Jul 6, 2024
1 parent 45982ae commit 28df5a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 461 deletions.
4 changes: 2 additions & 2 deletions seqnado/workflow/rules/pileup_default.smk
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ rule fragment_bedgraph:
genome=config["genome"]["chromosome_sizes"]
threads: config["deeptools"]["threads"],
resources:
runtime=lambda wildcards, attempt: f"{4 * 2 ** (attempt - 1)}h",
runtime="4h",
mem=lambda wildcards, attempt: f"{4 * 2 ** (attempt - 1)}GB",
log:
"seqnado_output/logs/bedgraphs/{sample}.log",
Expand All @@ -138,7 +138,7 @@ rule fragment_bedgraph:
bedtools bamtobed -bedpe -i {params.outdir}/{wildcards.sample}_sorted_name.bam > {params.outdir}/{wildcards.sample}.bedpe 2>> {log}
awk '$1 == $4 && $6 - $2 < 1000 {{print $1, $2, $6}}' {params.outdir}/{wildcards.sample}.bedpe > {params.outdir}/{wildcards.sample}_filtered.bed 2>> {log}
sort -k1,1 -k2,2n -k3,3n {params.outdir}/{wildcards.sample}_filtered.bed > {params.outdir}/{wildcards.sample}_sorted.bed 2>> {log}
bedtools genomecov -bg -i {params.outdir}/{wildcards.sample}_sorted.bed -g {params.genome} -threads {threads} > {output.bedgraph} 2>> {log}
bedtools genomecov -bg -i {params.outdir}/{wildcards.sample}_sorted.bed -g {params.genome} > {output.bedgraph} 2>> {log}
rm {params.outdir}/{wildcards.sample}.bedpe
rm {params.outdir}/{wildcards.sample}_filtered.bed
Expand Down
Loading

0 comments on commit 28df5a8

Please sign in to comment.