Skip to content

Commit

Permalink
add escape in awk
Browse files Browse the repository at this point in the history
  • Loading branch information
CChahrour committed Jun 28, 2024
1 parent 822fd02 commit 4e9ff8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion seqnado/workflow/rules/pileup_default.smk
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ rule fragment_bedgraph:
"""
samtools sort -n -o {params.outdir}/{wildcards.sample}_sorted.bam {input.bam} 2> {log}
bedtools bamtobed -bedpe -i {params.outdir}/{wildcards.sample}_sorted.bam > {params.outdir}/{wildcards.sample}.bed 2>> {log}
awk '$1==$4 && $6-$2 < 1000 {print $0}' {params.outdir}/{wildcards.sample}.bed > {params.outdir}/{wildcards.sample}_clean.bed 2>> {log}
awk '$1==$4 && $6-$2 < 1000 {{print $0}}' {params.outdir}/{wildcards.sample}.bed > {params.outdir}/{wildcards.sample}_clean.bed 2>> {log}
cut -f 1,2,6 {params.outdir}/{wildcards.sample}_clean.bed | sort -k1,1 -k2,2n -k3,3n > {params.outdir}/{wildcards.sample}_fragments.bed 2>> {log}
bedtools genomecov -bg -i {params.outdir}/{wildcards.sample}_fragments.bed -g {params.genome} > {output.bedgraph} 2>> {log}
Expand Down

0 comments on commit 4e9ff8e

Please sign in to comment.