Skip to content
Snippets Groups Projects
Commit 28bc62ed authored by Laura Cook's avatar Laura Cook
Browse files

remove counting number of peaks

parent 862b84b7
Branches
No related tags found
No related merge requests found
......@@ -391,41 +391,27 @@ rule call_peaks_macs2:
# > fraction of reads in peaks (convert BAM to bed first then do intersect with peaks)
# ===============================================================================================
#peak counts in a format that multiqc can handle
# rule get_narrow_peak_counts_for_multiqc:
# input:
# peaks = "results/macs2/{case}_vs_{control}_{stage}_{mark}_macs2_peaks.narrowPeak"
# output:
# "results/macs2/{case}-vs-{control}_{stage}_{mark}-narrowpeak-count_mqc.json"
# params:
# peakType = "narrowPeak"
# shell:
# "python2.7 scripts/count_peaks.py \
# --peak_type {params.peakType} \
# --peaks {input.peaks} --sample_name {wildcards.case} > {output}"
#
## Convert BAM to tagAlign file for calculating FRiP QC metric (Fraction of reads in peaks)
rule bamToBed:
input:
"results/bwa/{case}_{stage}_{mark}_q30.sorted.dedup.bam"
output:
"results/bwa/{case}_{stage}_{mark}_q30.sorted.dedup.bed"
log:
"logs/{case}_{stage}_{mark}.bamToBed"
shell:
"samtools sort -n {input} | bedtools bamtobed -i - > {output}"
# ## Convert BAM to tagAlign file for calculating FRiP QC metric (Fraction of reads in peaks)
# rule bamToBed:
# input:
# "results/bwa/{case}_{stage}_{mark}_q30.sorted.dedup.bam"
# output:
# "results/bwa/{case}_{stage}_{mark}_q30.sorted.dedup.bed"
# log:
# "logs/{case}_{stage}_{mark}.bamToBed"
# shell:
# "samtools sort -n {input} | bedtools bamtobed -i - > {output}"
#
# #
# # ## Fraction of reads in peaks
# rule frip:
# input:
# bed = "results/bwa/{case}_{stage}_{mark}_q30.sorted.dedup.bed",
# peak = "results/macs2/{case}_vs_{control}_{stage}_{mark}_macs2_peaks.narrowPeak"
# output:
# "results/frip/{case}_vs_{control}_{stage}_{mark}.frip.txt"
# shell:
# "python2.7 scripts/encode_frip.py {input.bed} {input.peak} > {output}"
# ## Fraction of reads in peaks
rule frip:
input:
bed = "results/bwa/{case}_{stage}_{mark}_q30.sorted.dedup.bed",
peak = "results/macs2/{case}_vs_{control}_{stage}_{mark}_macs2_peaks.narrowPeak"
output:
"results/frip/{case}_vs_{control}_{stage}_{mark}.frip.txt"
shell:
"python2.7 scripts/encode_frip.py {input.bed} {input.peak} > {output}"
# ===============================================================================================
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment