Skip to content

Instantly share code, notes, and snippets.

@edmundmiller
Created November 15, 2018 19:35
Show Gist options
  • Save edmundmiller/79413754014823c1e66cc536efca801c to your computer and use it in GitHub Desktop.
Save edmundmiller/79413754014823c1e66cc536efca801c to your computer and use it in GitHub Desktop.
rule alignHistones_hg18:
input:
sample=["data/2018-11-13/GM_{unit}.fastq"]
output:
"results/2018-11-13/GM_{unit}_hg18.bam"
log:
"logs/bowtie2/{unit}.log"
params:
index="data/2018-06-24/genome",
extra=""
threads: 4
wrapper:
"0.27.1/bio/bowtie2/align"
rule sort_Histones_hg18:
input:
"results/2018-11-13/GM_{unit}_hg18.bam",
output:
"results/2018-11-13/GM_{unit}_hg18.sorted.bam",
params:
"",
threads: 8
wrapper:
"0.27.1/bio/samtools/sort"
rule HistonesIntersect:
input:
GM_no_genes="results/2018-11-09/groseq_GM_noGenes.bed",
H3K27ac="results/2018-11-13/GM_H3K27ac_hg18.sorted.bam",
H3K4me1="results/2018-11-13/GM_H3K4me1_hg18.sorted.bam",
output:
"results/2018-11-10/eRNA_GM_hg18.bed"
log:
"logs/HistonesIntersect.log"
conda:
"../envs/bedtools.yaml"
threads: 8
shell:
"bedtools intersect -a {input.GM_no_genes} -b {input.H3K27ac} {input.H3K4me1} -sorted -u -bed > {output} 2> {log}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment