Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hub
ePeak
Commits
cb96e9b2
Commit
cb96e9b2
authored
Apr 01, 2022
by
Rachel LEGENDRE
Browse files
fix error in IA when nomodel
parent
732d6674
Changes
1
Hide whitespace changes
Inline
Side-by-side
workflow/rules/compute_frip.rules
deleted
100755 → 0
View file @
732d6674
#########################################################################
# ePeak: Standardize and reproducible ChIP-seq analysis from raw #
# data to differential analysis #
# Authors: Rachel Legendre, Maelle Daunesse #
# Copyright (c) 2019-2020 Institut Pasteur (Paris) and CNRS. #
# #
# This file is part of ePeak workflow. #
# #
# ePeak is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# ePeak is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details . #
# #
# You should have received a copy of the GNU General Public License #
# along with ePeak (LICENSE). #
# If not, see <https://www.gnu.org/licenses/>. #
#########################################################################
rule compute_frip:
input:
bam = compute_frip_bam,
bed = compute_frip_peaks
output:
compute_frip_csv
params:
paired = compute_frip_paired
singularity:
"epeak.img"
log:
out = compute_frip_log
shell:
"""
temp_file=$(mktemp)
if [[ {params.paired} == "True" ]]
then
#write reads as bedpe bed file to get fragments instead of reads
bedtools bamtobed -bedpe -i {input.bam} > $temp_file
else
bedtools bamtobed -i {input.bam} > $temp_file
fi
#compute number of fragments overlap peaks
mapReads=$(bedtools intersect -a $temp_file -b {input.bed} -wa -u | wc -l)
#compute number of mapped reads
totReads=$(samtools view -c -F 260 {input.bam})
#compute FRiP
totReads/mapReads
# plot_type: 'generalstats'
Sample FRiP
H3K27ac_shCtrl 1.06
H3K27ac_shUbc9 1.14
Klf4_shCtrl 1.34
Klf4_shUbc9 1.19
"""
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment