Commit a7cb2a01 authored by Rachel  LEGENDRE's avatar Rachel LEGENDRE
Browse files

connect seacr to IA and chipflowr

parent b322e38b
......@@ -316,8 +316,6 @@ compute_idr:
intersectionApproach: yes
ia_overlap: 0.8
```
> SEACR may lead to produce few number of peaks so the Intersection Approach can produce an empty file with no union of peaks. We advice to set differential analysis setting to no and check the results of SEACR before tu run DE.
## Run the pipeline on test data
......
This diff is collapsed.
......@@ -56,7 +56,7 @@ design:
marks: H3K27ac, Klf4
condition: shCtrl, shUbc9
replicates: Rep
spike: false
spike: no
spike_genome_file: /path/to/genome/directory/dmel9.fa
#===============================================================================
......@@ -65,14 +65,14 @@ design:
#
# :Parameters:
#
# - index: assuming needed indexes are here if False
# - index: assuming needed indexes are here if no
# - genome_directory: directory where all indexed are written
# - name: name of prefix use in all output files from mapping
# - fasta_file: path to Reference Genome in fasta format
#===============================================================================
genome:
index: true
index: yes
genome_directory: genome/
name: mm10
fasta_file: genome/mm10.fa
......
......@@ -31,6 +31,7 @@ rule igv_session:
genome = igv_session_genome,
wdir = igv_session_wdir,
marks = igv_session_mark,
conds = igv_session_conds,
autoScale = igv_session_autoScale,
normalize = igv_session_normalize
log :
......@@ -40,6 +41,7 @@ rule igv_session:
import os
import sys
import shutil
import itertools
colors= ["135,86,146", "243,132,0", "161,202,241", "190,0,50", "243,195,0",
......@@ -47,11 +49,11 @@ rule igv_session:
"249,147,121", "96,78,151", "46,166,0", "179,68,108", "220,211,0",
"136,45,23", "141,182,0", "101,69,34", "226,88,34", "43,61,38"]
# create dictionnary with one color by mark
# create dictionnary with one color by mark_cond
mark_color = {}
i = 0
for mark in params.marks:
mark_color[mark] = colors[i]
for combinaison in list(itertools.product(params.marks, params.conds)):
mark_color["_".join(combinaison)] = colors[i]
i += 1
# get real path of xml output file
......@@ -81,7 +83,8 @@ rule igv_session:
#print custom panels
print("<Panel height=\"1180\" name=\"DataPanel\" width=\"3077\">")
for mark in marks:
for combinaison in list(itertools.product(params.marks, params.conds)):
mark = "_".join(combinaison)
for file in input:
id = os.path.basename(file)
name = id.split("_cov")[0]
......
......@@ -39,10 +39,16 @@ rule intersectionApproach:
Rep1_temp=$(mktemp)
Rep2_temp=$(mktemp)
awk '$9>2 && $7>3 {{print $0}}' {input.rep[0]} > $Rep1_temp
awk '$9>2 && $7>3 {{print $0}}' {input.rep[1]} > $Rep2_temp
if [[ {input.rep[0]} == *"stringent"* || {input.rep[0]} == *"relaxed"* ]]
then
cat {input.rep[0]} > $Rep1_temp
cat {input.rep[1]} > $Rep2_temp
else
awk '$9>2 && $7>3 {{print $0}}' {input.rep[0]} > $Rep1_temp
awk '$9>2 && $7>3 {{print $0}}' {input.rep[1]} > $Rep2_temp
fi
intersectBed -c -r -f {params.overlap} -a $Rep1_temp -b $Rep2_temp | awk 'BEGIN{{OFS="\t"}} {{if($NF==2) print $1,$2,$3,$4,$5,$6,$7,$8,$9, $10}}' > {output} 2> {log.out}
intersectBed -c -r -f {params.overlap} -a $Rep1_temp -b $Rep2_temp > {output} 2> {log.out}
# if file empty, stop rule
if [ ! -s {output} ] ;then
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment