ChIP-seq

# —————————-
# —— Diffreps-files ——

./V_8_2_3_p600_d8_D2_H3K4me3.dedup.sorted.bam
./V_8_2_3_p600_d8_D2_input.dedup.sorted.bam
./V_8_2_4_p600_d8_D1_H3K4me3.dedup.sorted.bam
./V_8_2_4_p600_d8_D1_input.dedup.sorted.bam

./V_8_3_1_p600_601_d12_D1_H3K4me3.dedup.sorted.bam
./V_8_3_1_p600_601_d12_D1_input.dedup.sorted.bam
./V_8_3_2_p600_601_d9_D2_H3K4me3.dedup.sorted.bam
./V_8_3_2_p600_601_d9_D2_input.dedup.sorted.bam

./V_8_0_untreated_D1_H3K4me3.dedup.sorted.bam
./V_8_0_untreated_D1_input.dedup.sorted.bam
./V_8_0_untreated_D2_H3K4me3.dedup.sorted.bam
./V_8_0_untreated_D2_input.dedup.sorted.bam

./V_8_1_5_p601_d8_D2_H3K4me3.dedup.sorted.bam
./V_8_1_5_p601_d8_D2_input.dedup.sorted.bam
./V_8_1_5_p604_d8_D2_H3K4me3.dedup.sorted.bam
./V_8_1_5_p604_d8_D2_input.dedup.sorted.bam
./V_8_1_6_p601_d8_D1_H3K4me3.dedup.sorted.bam
./V_8_1_6_p601_d8_D1_input.dedup.sorted.bam
./V_8_1_6_p604_d8_D1_H3K4me3.dedup.sorted.bam
./V_8_1_6_p604_d8_D1_input.dedup.sorted.bam

./V_8_2_3_p605_d8_D2_H3K4me3.dedup.sorted.bam
./V_8_2_3_p605_d8_D2_input.dedup.sorted.bam
./V_8_2_4_p605_d8_D1_H3K4me3.dedup.sorted.bam
./V_8_2_4_p605_d8_D1_input.dedup.sorted.bam

./V_8_3_1_p604_605_d12_D1_H3K4me3.dedup.sorted.bam
./V_8_3_1_p604_605_d12_D1_input.dedup.sorted.bam

./V_8_3_2_p604_605_d9_D2_H3K4me3.dedup.sorted.bam
./V_8_3_2_p604_605_d9_D2_input.dedup.sorted.bam
./V_8_4_1_p602_d8_D2_H3K4me3.dedup.sorted.bam
./V_8_4_1_p602_d8_D2_input.dedup.sorted.bam
./V_8_4_2_p602_d8_D1_H3K4me3.dedup.sorted.bam
./V_8_4_2_p602_d8_D1_input.dedup.sorted.bam

——————————–
ln -s ./V_8_4_2_p602_d8_D1_H3K27me3.dedup.sorted.bed p602_d8_D1_H3K27me3.dedup.sorted.bed
ln -s ./V_8_4_1_p602_d8_D2_H3K27me3.dedup.sorted.bed p602_d8_D2_H3K27me3.dedup.sorted.bed
#ln -s ./V_8_4_2_p602_d8_D1_input.dedup.sorted.bed p602_d8_D1_input.dedup.sorted.bed
#ln -s ./V_8_4_1_p602_d8_D2_input.dedup.sorted.bed p602_d8_D2_input.dedup.sorted.bed

ln -s ./V_8_2_4_p605_d8_D1_H3K27me3.dedup.sorted.bed p605_d8_D1_H3K27me3.dedup.sorted.bed
ln -s ./V_8_2_3_p605_d8_D2_H3K27me3.dedup.sorted.bed p605_d8_D2_H3K27me3.dedup.sorted.bed
#ln -s ./V_8_2_4_p605_d8_D1_input.dedup.sorted.bed p605_d8_D1_input.dedup.sorted.bed
#ln -s ./V_8_2_3_p605_d8_D2_input.dedup.sorted.bed p605_d8_D2_input.dedup.sorted.bed

ln -s ./V_8_1_6_p604_d8_D1_H3K27me3.dedup.sorted.bed p604_d8_D1_H3K27me3.dedup.sorted.bed
ln -s ./V_8_1_5_p604_d8_D2_H3K27me3.dedup.sorted.bed p604_d8_D2_H3K27me3.dedup.sorted.bed
#ln -s ./V_8_1_6_p604_d8_D1_input.dedup.sorted.bed p604_d8_D1_input.dedup.sorted.bed
#ln -s ./V_8_1_5_p604_d8_D2_input.dedup.sorted.bed p604_d8_D2_input.dedup.sorted.bed

ln -s ./V_8_3_1_p604_605_d12_D1_H3K27me3.dedup.sorted.bed p604_605_d12_D1_H3K27me3.dedup.sorted.bed
ln -s ./V_8_3_2_p604_605_d9_D2_H3K27me3.dedup.sorted.bed p604_605_d9_D2_H3K27me3.dedup.sorted.bed
#ln -s ./V_8_3_1_p604_605_d12_D1_input.dedup.sorted.bed p604_605_d12_D1_input.dedup.sorted.bed
#ln -s ./V_8_3_2_p604_605_d9_D2_input.dedup.sorted.bed p604_605_d9_D2_input.dedup.sorted.bed

for a diffreps results (for example p602_D1_d8 vs p600_D1_d8)
we need four files,
– p602_D1_d8_H3K4me3
– p602_D1_d8_input <-- untreated D1 input - p600_D1_d8_H3K4me3 <-- p600+601_d9_H3K4me3 - p600_D1_d8_input <-- untreated D1 input #diffReps.pl -tr C1.bed C2.bed C3.bed -co S1.bed S2.bed S3.bed -gn mm9 -re diff.nb.txt -me nb diffreps_parameters=" --nsd sharp --meth gt --window 1000 -frag 200 --nproc 10 --pval 0.0001;" #diffreps_parameters=" --nsd broad --meth gt --window 10000 -frag 200 --nproc 10 --pval 0.0001;" for histoneType in H3K4me3; do #p602_d8 echo "diffReps.pl --treatment ../picard/p602_d8_D1_${histoneType}.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_${histoneType}.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --gname hg19 --report LT_d8_D1.diff.gt.txt ${diffreps_parameters}" echo "diffReps.pl --treatment ../picard/p602_d8_D2_${histoneType}.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_2_p600_601_d9_D2_${histoneType}.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report LT_d8_D2.diff.gt.txt ${diffreps_parameters}" echo "diffReps.pl --treatment ../picard/p602_d8_D1_${histoneType}.dedup.sorted.bed ../picard/p602_d8_D2_${histoneType}.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_${histoneType}.dedup.sorted.bed ../picard/V_8_3_2_p600_601_d9_D2_${histoneType}.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report LT_d8.diff.gt.txt ${diffreps_parameters}" #p605_d8 echo "diffReps.pl --treatment ../picard/p605_d8_D1_${histoneType}.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_${histoneType}.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --gname hg19 --report LTtr_d8_D1.diff.gt.txt ${diffreps_parameters}" echo "diffReps.pl --treatment ../picard/p605_d8_D2_${histoneType}.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_2_p600_601_d9_D2_${histoneType}.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report LTtr_d8_D2.diff.gt.txt ${diffreps_parameters}" echo "diffReps.pl --treatment ../picard/p605_d8_D1_${histoneType}.dedup.sorted.bed ../picard/p605_d8_D2_${histoneType}.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_${histoneType}.dedup.sorted.bed ../picard/V_8_3_2_p600_601_d9_D2_${histoneType}.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report LTtr_d8.diff.gt.txt ${diffreps_parameters}" #p604_d8 echo "diffReps.pl --treatment ../picard/p604_d8_D1_${histoneType}.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_${histoneType}.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --gname hg19 --report sT_d8_D1.diff.gt.txt ${diffreps_parameters}" echo "diffReps.pl --treatment ../picard/p604_d8_D2_${histoneType}.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_2_p600_601_d9_D2_${histoneType}.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report sT_d8_D2.diff.gt.txt ${diffreps_parameters}" echo "diffReps.pl --treatment ../picard/p604_d8_D1_${histoneType}.dedup.sorted.bed ../picard/p604_d8_D2_${histoneType}.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_${histoneType}.dedup.sorted.bed ../picard/V_8_3_2_p600_601_d9_D2_${histoneType}.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report sT_d8.diff.gt.txt ${diffreps_parameters}" #p604_605_d8 echo "diffReps.pl --treatment ../picard/p604_605_d12_D1_${histoneType}.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_${histoneType}.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --gname hg19 --report sT_LTtr_d8_D1.diff.gt.txt ${diffreps_parameters}" echo "diffReps.pl --treatment ../picard/p604_605_d9_D2_${histoneType}.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_2_p600_601_d9_D2_${histoneType}.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report sT_LTtr_d8_D2.diff.gt.txt ${diffreps_parameters}" echo "diffReps.pl --treatment ../picard/p604_605_d12_D1_${histoneType}.dedup.sorted.bed ../picard/p604_605_d9_D2_${histoneType}.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_${histoneType}.dedup.sorted.bed ../picard/V_8_3_2_p600_601_d9_D2_${histoneType}.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report sT_LTtr_d8.diff.gt.txt ${diffreps_parameters}" done # ---- #p602_d8 diffReps.pl --treatment ../picard/p602_d8_D1_H3K4me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_H3K4me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --gname hg19 --report LT_d8_D1.diff.gt.txt --nsd sharp --meth gt --window 1000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/p602_d8_D2_H3K4me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_2_p600_601_d9_D2_H3K4me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report LT_d8_D2.diff.gt.txt --nsd sharp --meth gt --window 1000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/p602_d8_D1_H3K4me3.dedup.sorted.bed ../picard/p602_d8_D2_H3K4me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_H3K4me3.dedup.sorted.bed ../picard/V_8_3_2_p600_601_d9_D2_H3K4me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report LT_d8.diff.gt.txt --nsd sharp --meth gt --window 1000 -frag 200 --nproc 10 --pval 0.0001; #p605_d8 diffReps.pl --treatment ../picard/p605_d8_D1_H3K4me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_H3K4me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --gname hg19 --report LTtr_d8_D1.diff.gt.txt --nsd sharp --meth gt --window 1000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/p605_d8_D2_H3K4me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_2_p600_601_d9_D2_H3K4me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report LTtr_d8_D2.diff.gt.txt --nsd sharp --meth gt --window 1000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/p605_d8_D1_H3K4me3.dedup.sorted.bed ../picard/p605_d8_D2_H3K4me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_H3K4me3.dedup.sorted.bed ../picard/V_8_3_2_p600_601_d9_D2_H3K4me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report LTtr_d8.diff.gt.txt --nsd sharp --meth gt --window 1000 -frag 200 --nproc 10 --pval 0.0001; #p604_d8 diffReps.pl --treatment ../picard/p604_d8_D1_H3K4me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_H3K4me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --gname hg19 --report sT_d8_D1.diff.gt.txt --nsd sharp --meth gt --window 1000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/p604_d8_D2_H3K4me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_2_p600_601_d9_D2_H3K4me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report sT_d8_D2.diff.gt.txt --nsd sharp --meth gt --window 1000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/p604_d8_D1_H3K4me3.dedup.sorted.bed ../picard/p604_d8_D2_H3K4me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_H3K4me3.dedup.sorted.bed ../picard/V_8_3_2_p600_601_d9_D2_H3K4me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report sT_d8.diff.gt.txt --nsd sharp --meth gt --window 1000 -frag 200 --nproc 10 --pval 0.0001; #p604_605_d8 diffReps.pl --treatment ../picard/p604_605_d12_D1_H3K4me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_H3K4me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --gname hg19 --report sT_LTtr_d8_D1.diff.gt.txt --nsd sharp --meth gt --window 1000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/p604_605_d9_D2_H3K4me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_2_p600_601_d9_D2_H3K4me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report sT_LTtr_d8_D2.diff.gt.txt --nsd sharp --meth gt --window 1000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/p604_605_d12_D1_H3K4me3.dedup.sorted.bed ../picard/p604_605_d9_D2_H3K4me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_H3K4me3.dedup.sorted.bed ../picard/V_8_3_2_p600_601_d9_D2_H3K4me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report sT_LTtr_d8.diff.gt.txt --nsd sharp --meth gt --window 1000 -frag 200 --nproc 10 --pval 0.0001; #-- #p600_601_d8 diffReps.pl --treatment ../picard/V_8_3_1_p600_601_d12_D1_H3K4me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --control ../picard/V_8_0_untreated_D1_H3K4me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --gname hg19 --report p600_601_d12_D1.diff.gt.txt --nsd sharp --meth gt --window 1000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/V_8_3_2_p600_601_d9_D2_H3K4me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_0_untreated_D2_H3K4me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report p600_601_d9_D2.diff.gt.txt --nsd sharp --meth gt --window 1000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/V_8_3_1_p600_601_d12_D1_H3K4me3.dedup.sorted.bed ../picard/V_8_3_2_p600_601_d9_D2_H3K4me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_0_untreated_D1_H3K4me3.dedup.sorted.bed ../picard/V_8_0_untreated_D2_H3K4me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report p600_601_d9or12.diff.gt.txt --nsd sharp --meth gt --window 1000 -frag 200 --nproc 10 --pval 0.0001; #600+601 vs untreated # Treatment files: V_8_3_1_p600_601_d12_D1_H3K4me3.dedup.sorted.bed V_8_3_2_p600_601_d9_D2_H3K4me3.dedup.sorted.bed # Control files: V_8_0_untreated_D1_input.dedup.sorted.bed V_8_0_untreated_D2_input.dedup.sorted.bed # Treatment background: ../picard/V_8_0_untreated_D1_H3K4me3.dedup.sorted.bed ../picard/V_8_0_untreated_D2_H3K4me3.dedup.sorted.bed # Control background: V_8_0_untreated_D1_input.dedup.sorted.bed V_8_0_untreated_D2_input.dedup.sorted.bed --btr --control --bco # ---- #p602_d8 #diffReps.pl --treatment ../picard/p602_d8_D1_H3K27me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_H3K27me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --gname hg19 --report LT_d8_D1.diff.gt.txt --nsd broad --meth gt --window 10000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/p602_d8_D2_H3K27me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_2_p600_601_d9_D2_H3K27me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report LT_d8_D2.diff.gt.txt --nsd broad --meth gt --window 10000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/p602_d8_D1_H3K27me3.dedup.sorted.bed ../picard/p602_d8_D2_H3K27me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_H3K27me3.dedup.sorted.bed ../picard/V_8_3_2_p600_601_d9_D2_H3K27me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report LT_d8.diff.gt.txt --nsd broad --meth gt --window 10000 -frag 200 --nproc 10 --pval 0.0001; #p605_d8 #diffReps.pl --treatment ../picard/p605_d8_D1_H3K27me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_H3K27me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --gname hg19 --report LTtr_d8_D1.diff.gt.txt --nsd broad --meth gt --window 10000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/p605_d8_D2_H3K27me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_2_p600_601_d9_D2_H3K27me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report LTtr_d8_D2.diff.gt.txt --nsd broad --meth gt --window 10000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/p605_d8_D1_H3K27me3.dedup.sorted.bed ../picard/p605_d8_D2_H3K27me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_H3K27me3.dedup.sorted.bed ../picard/V_8_3_2_p600_601_d9_D2_H3K27me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report LTtr_d8.diff.gt.txt --nsd broad --meth gt --window 10000 -frag 200 --nproc 10 --pval 0.0001; #p604_d8 #diffReps.pl --treatment ../picard/p604_d8_D1_H3K27me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_H3K27me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --gname hg19 --report sT_d8_D1.diff.gt.txt --nsd broad --meth gt --window 10000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/p604_d8_D2_H3K27me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_2_p600_601_d9_D2_H3K27me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report sT_d8_D2.diff.gt.txt --nsd broad --meth gt --window 10000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/p604_d8_D1_H3K27me3.dedup.sorted.bed ../picard/p604_d8_D2_H3K27me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_H3K27me3.dedup.sorted.bed ../picard/V_8_3_2_p600_601_d9_D2_H3K27me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report sT_d8.diff.gt.txt --nsd broad --meth gt --window 10000 -frag 200 --nproc 10 --pval 0.0001; #p604_605_d8 #diffReps.pl --treatment ../picard/p604_605_d12_D1_H3K27me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_H3K27me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --gname hg19 --report sT_LTtr_d8_D1.diff.gt.txt --nsd broad --meth gt --window 10000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/p604_605_d9_D2_H3K27me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_2_p600_601_d9_D2_H3K27me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report sT_LTtr_d8_D2.diff.gt.txt --nsd broad --meth gt --window 10000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/p604_605_d12_D1_H3K27me3.dedup.sorted.bed ../picard/p604_605_d9_D2_H3K27me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_3_1_p600_601_d12_D1_H3K27me3.dedup.sorted.bed ../picard/V_8_3_2_p600_601_d9_D2_H3K27me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report sT_LTtr_d8.diff.gt.txt --nsd broad --meth gt --window 10000 -frag 200 --nproc 10 --pval 0.0001; #-- #p600_601_d8 diffReps.pl --treatment ../picard/V_8_3_1_p600_601_d12_D1_H3K27me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --control ../picard/V_8_0_untreated_D1_H3K27me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed --gname hg19 --report p600_601_d12_D1.diff.gt.txt --nsd broad --meth gt --window 10000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/V_8_3_2_p600_601_d9_D2_H3K27me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_0_untreated_D2_H3K27me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report p600_601_d9_D2.diff.gt.txt --nsd broad --meth gt --window 10000 -frag 200 --nproc 10 --pval 0.0001; diffReps.pl --treatment ../picard/V_8_3_1_p600_601_d12_D1_H3K27me3.dedup.sorted.bed ../picard/V_8_3_2_p600_601_d9_D2_H3K27me3.dedup.sorted.bed --btr ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --control ../picard/V_8_0_untreated_D1_H3K27me3.dedup.sorted.bed ../picard/V_8_0_untreated_D2_H3K27me3.dedup.sorted.bed --bco ../picard/V_8_0_untreated_D1_input.dedup.sorted.bed ../picard/V_8_0_untreated_D2_input.dedup.sorted.bed --gname hg19 --report p600_601_d9or12.diff.gt.txt --nsd broad --meth gt --window 10000 -frag 200 --nproc 10 --pval 0.0001; # ----------------------- # ------ BED-files ------ # ~/Tools/diffreps/bin/diffReps.pl --treatment ../picard/${sample}_h3k27me3.dedup.sorted.bed --control ../picard/${sample}_input.dedup.sorted.bed --nsd broad --gname hg19 --report ${sample}.diff.gt.txt --meth gt --window 10000 --frag 200 --nproc 10 --pval 0.0001; \ # grep -v "#" ${sample}.diff.gt.txt > diff.gt.txt; \
# grep -v “Start” diff.gt.txt > diff.gt.txt_; \
# grep “Up” diff.gt.txt > diff.up.gt.txt; \

for diffreps_res in p605_d3_vs_p600_d3.diff.gt.txt p604_d3_vs_p601_d3_D2.diff.gt.txt p604_d3_vs_p601_d3_D1.diff.gt.txt p604_d8_vs_p601_d8.diff.gt.txt p604_d8_vs_p601_d8_D2.diff.gt.txt p604_d8_vs_p601_d8_D1.diff.gt.txt p604_d3_vs_p601_d3.diff.gt.txt p605_d8_vs_p600_d8_D2.diff.gt.txt p605_d3_vs_p600_d3_D2.diff.gt.txt p605_d8_vs_p600_d8_D1.diff.gt.txt p605_d8_vs_p600_d8.diff.gt.txt p605_d3_vs_p600_d3_D1.diff.gt.txt; do
for diffreps_res in p600_601_d12_D1.diff.gt.txt p600_601_d9_D2.diff.gt.txt p600_601_d9or12.diff.gt.txt; do
# delete the headers in *_noheader
grep -v “^#” ${diffreps_res} > ${diffreps_res}_noh
grep -v “^Chrom” ${diffreps_res}_noh > ${diffreps_res}_noheader
awk ‘BEGIN {OFS=”\t”} {print $1,$2,$3,”diffreps_peak_”NR,$12}’ ${diffreps_res}_noheader > peaks.bed_;
bedops -n -1 peaks.bed_ /ref/Homo_sapiens/UCSC/hg19/blacklists/hg19-blacklist.bed > ${diffreps_res}.bed;
#mv ${diffreps_res}.bed ../K27_additional_diffreps_bed_bw
done

# —————————————————-
# —- using ChIPseqSpikeInFree for NORMALIZATION —-

ln -s V_8_4_2_p602_d8_D1_H3K27me3.dedup.sorted.bam p602_d8_D1_H3K27me3.dedup.sorted.bam
ln -s V_8_4_1_p602_d8_D2_H3K27me3.dedup.sorted.bam p602_d8_D2_H3K27me3.dedup.sorted.bam
ln -s V_8_2_4_p605_d8_D1_H3K27me3.dedup.sorted.bam p605_d8_D1_H3K27me3.dedup.sorted.bam
ln -s V_8_2_3_p605_d8_D2_H3K27me3.dedup.sorted.bam p605_d8_D2_H3K27me3.dedup.sorted.bam
ln -s V_8_1_6_p604_d8_D1_H3K27me3.dedup.sorted.bam p604_d8_D1_H3K27me3.dedup.sorted.bam
ln -s V_8_1_5_p604_d8_D2_H3K27me3.dedup.sorted.bam p604_d8_D2_H3K27me3.dedup.sorted.bam
ln -s V_8_3_1_p604_605_d12_D1_H3K27me3.dedup.sorted.bam p604_605_d12_D1_H3K27me3.dedup.sorted.bam
ln -s V_8_3_2_p604_605_d9_D2_H3K27me3.dedup.sorted.bam p604_605_d9_D2_H3K27me3.dedup.sorted.bam
ln -s V_8_0_untreated_D1_input.dedup.sorted.bam untreated_D1_input.dedup.sorted.bam
ln -s V_8_0_untreated_D2_input.dedup.sorted.bam untreated_D2_input.dedup.sorted.bam

#if (!requireNamespace(“BiocManager”, quietly = TRUE))
# install.packages(“BiocManager”)
#BiocManager::install(“Rsamtools”)
#BiocManager::install(“GenomicRanges”)
#BiocManager::install(“GenomicAlignments”)

#install.packages(“devtools”)
library(devtools)
#install_github(“stjude/ChIPseqSpikeInFree”)
packageVersion(‘ChIPseqSpikeInFree’)

metaFile <- "/home/jhuang/DATA/Data_Denise_ChIPSeq_Protocol2/Data_H3K4me3/sample_meta.txt" setwd("/home/jhuang/DATA/Data_Denise_ChIPSeq_Protocol2/Data_H3K4me3/results_H3K4me3/picard") bams <- c("p602_d8_D1_H3K4me3.dedup.sorted.bam","p602_d8_D2_H3K4me3.dedup.sorted.bam","p605_d8_D1_H3K4me3.dedup.sorted.bam","p605_d8_D2_H3K4me3.dedup.sorted.bam","p604_d8_D1_H3K4me3.dedup.sorted.bam","p604_d8_D2_H3K4me3.dedup.sorted.bam","p604_605_d12_D1_H3K4me3.dedup.sorted.bam","p604_605_d9_D2_H3K4me3.dedup.sorted.bam","p600_601_d12_D1_H3K4me3.dedup.sorted.bam","p600_601_d9_D2_H3K4me3.dedup.sorted.bam", "","","","" "untreated_D1_input.dedup.sorted.bam","untreated_D2_input.dedup.sorted.bam") metaFile <- "/home/jhuang/DATA/Data_Denise_ChIPSeq_Protocol2/Data_H3K27me3/sample_meta__.txt" setwd("/home/jhuang/DATA/Data_Denise_ChIPSeq_Protocol2/Data_H3K27me3/results_H3K27me3/picard") #bams <- c("p602_d8_D1_H3K27me3.dedup.sorted.bam","p602_d8_D2_H3K27me3.dedup.sorted.bam","p605_d8_D1_H3K27me3.dedup.sorted.bam","p605_d8_D2_H3K27me3.dedup.sorted.bam","p604_d8_D1_H3K27me3.dedup.sorted.bam","p604_d8_D2_H3K27me3.dedup.sorted.bam","p604_605_d12_D1_H3K27me3.dedup.sorted.bam","p604_605_d9_D2_H3K27me3.dedup.sorted.bam","untreated_D1_input.dedup.sorted.bam","untreated_D2_input.dedup.sorted.bam") #bams <- c("V_8_1_6_p601_d8_D1_H3K4me3.dedup.sorted.bam","V_8_0_untreated_D2_H3K4me3.dedup.sorted.bam","V_8_3_2_p600_601_d9_D2_input.dedup.sorted.bam","V_8_2_4_p600_d8_D1_input.dedup.sorted.bam","V_8_1_5_p604_d8_D2_H3K4me3.dedup.sorted.bam","V_8_1_6_p604_d8_D1_H3K4me3.dedup.sorted.bam","V_8_3_2_p600_601_d9_D2_H3K4me3.dedup.sorted.bam","V_8_1_5_p601_d8_D2_input.dedup.sorted.bam","V_8_2_4_p605_d8_D1_H3K4me3.dedup.sorted.bam","V_8_1_5_p601_d8_D2_H3K4me3.dedup.sorted.bam","V_8_3_1_p600_601_d12_D1_H3K4me3.dedup.sorted.bam","V_8_0_untreated_D1_H3K4me3.dedup.sorted.bam","V_8_3_2_p604_605_d9_D2_H3K4me3.dedup.sorted.bam","V_8_2_3_p605_d8_D2_H3K4me3.dedup.sorted.bam","V_8_0_untreated_D1_input.dedup.sorted.bam","V_8_3_1_p604_605_d12_D1_input.dedup.sorted.bam","V_8_4_1_p602_d8_D2_H3K4me3.dedup.sorted.bam","V_8_0_untreated_D2_input.dedup.sorted.bam","V_8_2_4_p605_d8_D1_input.dedup.sorted.bam","V_8_4_2_p602_d8_D1_H3K4me3.dedup.sorted.bam","V_8_1_6_p604_d8_D1_input.dedup.sorted.bam","V_8_2_4_p600_d8_D1_H3K4me3.dedup.sorted.bam","V_8_3_1_p600_601_d12_D1_input.dedup.sorted.bam","V_8_1_5_p604_d8_D2_input.dedup.sorted.bam","V_8_1_6_p601_d8_D1_input.dedup.sorted.bam","V_8_2_3_p600_d8_D2_H3K4me3.dedup.sorted.bam","V_8_2_3_p605_d8_D2_input.dedup.sorted.bam","V_8_3_2_p604_605_d9_D2_input.dedup.sorted.bam","V_8_4_2_p602_d8_D1_input.dedup.sorted.bam","V_8_2_3_p600_d8_D2_input.dedup.sorted.bam","V_8_3_1_p604_605_d12_D1_H3K4me3.dedup.sorted.bam","V_8_4_1_p602_d8_D2_input.dedup.sorted.bam") bams <- c("V_8_0_untreated_D1_H3K27me3.dedup.sorted.bam","V_8_0_untreated_D1_input.dedup.sorted.bam","V_8_0_untreated_D2_H3K27me3.dedup.sorted.bam","V_8_0_untreated_D2_input.dedup.sorted.bam","V_8_1_5_p601_d3_D2_H3K27me3.dedup.sorted.bam","V_8_1_5_p601_d3_D2_input.dedup.sorted.bam","V_8_1_5_p601_d8_D2_H3K27me3.dedup.sorted.bam","V_8_1_5_p601_d8_D2_input.dedup.sorted.bam","V_8_1_5_p604_d3_D2_H3K27me3.dedup.sorted.bam","V_8_1_5_p604_d3_D2_input.dedup.sorted.bam","V_8_1_5_p604_d8_D2_H3K27me3.dedup.sorted.bam","V_8_1_5_p604_d8_D2_input.dedup.sorted.bam","V_8_1_6_p601_d3_D1_H3K27me3.dedup.sorted.bam","V_8_1_6_p601_d3_D1_input.dedup.sorted.bam","V_8_1_6_p601_d8_D1_H3K27me3.dedup.sorted.bam","V_8_1_6_p601_d8_D1_input.dedup.sorted.bam","V_8_1_6_p604_d3_D1_H3K27me3.dedup.sorted.bam","V_8_1_6_p604_d3_D1_input.dedup.sorted.bam","V_8_1_6_p604_d8_D1_H3K27me3.dedup.sorted.bam","V_8_1_6_p604_d8_D1_input.dedup.sorted.bam","V_8_2_3_p600_d3_D2_H3K27me3.dedup.sorted.bam","V_8_2_3_p600_d3_D2_input.dedup.sorted.bam","V_8_2_3_p600_d8_D2_H3K27me3.dedup.sorted.bam","V_8_2_3_p600_d8_D2_input.dedup.sorted.bam","V_8_2_3_p605_d3_D2_H3K27me3.dedup.sorted.bam","V_8_2_3_p605_d3_D2_input.dedup.sorted.bam","V_8_2_3_p605_d8_D2_H3K27me3.dedup.sorted.bam","V_8_2_3_p605_d8_D2_input.dedup.sorted.bam","V_8_2_4_p600_d3_D1_H3K27me3.dedup.sorted.bam","V_8_2_4_p600_d3_D1_input.dedup.sorted.bam","V_8_2_4_p600_d8_D1_H3K27me3.dedup.sorted.bam","V_8_2_4_p600_d8_D1_input.dedup.sorted.bam","V_8_2_4_p605_d3_D1_H3K27me3.dedup.sorted.bam","V_8_2_4_p605_d3_D1_input.dedup.sorted.bam","V_8_2_4_p605_d8_D1_H3K27me3.dedup.sorted.bam","V_8_2_4_p605_d8_D1_input.dedup.sorted.bam","V_8_3_1_p600_601_d12_D1_H3K27me3.dedup.sorted.bam","V_8_3_1_p600_601_d12_D1_input.dedup.sorted.bam","V_8_3_1_p604_605_d12_D1_H3K27me3.dedup.sorted.bam","V_8_3_1_p604_605_d12_D1_input.dedup.sorted.bam","V_8_3_2_p600_601_d9_D2_H3K27me3.dedup.sorted.bam","V_8_3_2_p600_601_d9_D2_input.dedup.sorted.bam","V_8_3_2_p604_605_d9_D2_H3K27me3.dedup.sorted.bam","V_8_3_2_p604_605_d9_D2_input.dedup.sorted.bam","V_8_4_1_p602_d8_D2_H3K27me3.dedup.sorted.bam","V_8_4_1_p602_d8_D2_input.dedup.sorted.bam","V_8_4_2_p602_d8_D1_H3K27me3.dedup.sorted.bam","V_8_4_2_p602_d8_D1_input.dedup.sorted.bam") library("ChIPseqSpikeInFree") ChIPseqSpikeInFree(bamFiles = bams, chromFile = "hg19", metaFile = metaFile, prefix = "k27") #4. Run ChIPseqSpikeInFree pipeline with custom settings for ChIP-seq with unideal enrichment or many very broad enriched regions like H3K9me3 #ChIPseqSpikeInFree(bamFiles = bams, chromFile = "hg19", metaFile = metaFile, prefix = "k27", cutoff_QC = 1, maxLastTurn=0.97) Reporting summary INPUT.p600_601_d9_D2 , ave.SF = 153.6 INPUT.p600_d8_D1 , ave.SF = NA INPUT.p601_d8_D2 , ave.SF = NA INPUT.untreated_D1 , ave.SF = NA INPUT.p604_605_d12_D1 , ave.SF = NA INPUT.untreated_D2 , ave.SF = NA INPUT.p605_d8_D1 , ave.SF = NA INPUT.p604_d8_D1 , ave.SF = NA INPUT.p600_601_d12_D1 , ave.SF = NA INPUT.p604_d8_D2 , ave.SF = NA INPUT.p601_d8_D1 , ave.SF = NA INPUT.p605_d8_D2 , ave.SF = NA INPUT.p604_605_d9_D2 , ave.SF = 252.65 INPUT.p602_d8_D1 , ave.SF = 203.92 INPUT.p600_d8_D2 , ave.SF = NA INPUT.p602_d8_D2 , ave.SF = 263.75 H3K4me3.p602_d8_D1 , ave.SF = 2.87 H3K4me3.p602_d8_D2 , ave.SF = 1 H3K4me3.p605_d8_D1 , ave.SF = 2.74 H3K4me3.p605_d8_D2 , ave.SF = 2.8 H3K4me3.p604_d8_D1 , ave.SF = 2.67 H3K4me3.p604_d8_D2 , ave.SF = 3.56 H3K4me3.p604_605_d12_D1 , ave.SF = 2.44 H3K4me3.p604_605_d9_D2 , ave.SF = 2.77 H3K4me3.p600_601_d9_D2 , ave.SF = 2.46 H3K4me3.p601_d8_D2 , ave.SF = 3.74 H3K4me3.p600_601_d12_D1 , ave.SF = 2.51 H3K4me3.untreated_D1 , ave.SF = 3.74 H3K4me3.p601_d8_D1 , ave.SF = 3.77 H3K4me3.untreated_D2 , ave.SF = 3.13 H3K4me3.p600_d8_D1 , ave.SF = 3.77 H3K4me3.p600_d8_D2 , ave.SF = 3.65 [1] "/home/jhuang/DATA/Data_Denise_ChIPSeq_Protocol2/Data_H3K27me3/results_H3K27me3/picard" > metaFile <- "/home/jhuang/DATA/Data_Denise_ChIPSeq_Protocol2/Data_H3K27me3/sample_meta__part1.txt" > ChIPseqSpikeInFree(bamFiles = bams, chromFile = “hg19”, metaFile = metaFile, prefix = “k27”)
Reporting summary
H3K27me3.untreated_D1 , ave.SF = 2.27
INPUT.untreated_D1 , ave.SF = NA
H3K27me3.untreated_D2 , ave.SF = 2.42
INPUT.untreated_D2 , ave.SF = NA
H3K27me3.p601_d3_D2 , ave.SF = 2.99
INPUT.p601_d3_D2 , ave.SF = NA
H3K27me3.p601_d8_D2 , ave.SF = 3.21
INPUT.p601_d8_D2 , ave.SF = NA
H3K27me3.p604_d3_D2 , ave.SF = 2.3
INPUT.p604_d3_D2 , ave.SF = NA
H3K27me3.p604_d8_D2 , ave.SF = 2
INPUT.p604_d8_D2 , ave.SF = NA
H3K27me3.p601_d3_D1 , ave.SF = 2.43
INPUT.p601_d3_D1 , ave.SF = NA
H3K27me3.p601_d8_D1 , ave.SF = 3.64
INPUT.p601_d8_D1 , ave.SF = NA
H3K27me3.p604_d3_D1 , ave.SF = 1.95
INPUT.p604_d3_D1 , ave.SF = NA
H3K27me3.p604_d8_D1 , ave.SF = 1.83
INPUT.p604_d8_D1 , ave.SF = NA
H3K27me3.p600_d3_D2 , ave.SF = 2.24
INPUT.p600_d3_D2 , ave.SF = NA
H3K27me3.p600_d8_D2 , ave.SF = 1.88
INPUT.p600_d8_D2 , ave.SF = NA
H3K27me3.p605_d3_D2 , ave.SF = 1.5
INPUT.p605_d3_D2 , ave.SF = NA
H3K27me3.p605_d8_D2 , ave.SF = 1.28
INPUT.p605_d8_D2 , ave.SF = NA
H3K27me3.p600_d3_D1 , ave.SF = 2.43
INPUT.p600_d3_D1 , ave.SF = NA
H3K27me3.p600_d8_D1 , ave.SF = 3.64
INPUT.p600_d8_D1 , ave.SF = NA
H3K27me3.p605_d3_D1 , ave.SF = 1.99
INPUT.p605_d3_D1 , ave.SF = NA
H3K27me3.p605_d8_D1 , ave.SF = 1.7
INPUT.p605_d8_D1 , ave.SF = NA
H3K27me3.p600_601_d12 , ave.SF = 1.88
INPUT.p600_601_d12 , ave.SF = NA
H3K27me3.p604_605_d12_D1 , ave.SF = 1.55
INPUT.p604_605_d12_D1 , ave.SF = NA
H3K27me3.p600_601_d9_D2 , ave.SF = 1.52
INPUT.p600_601_d9_D2 , ave.SF = 176.16
H3K27me3.p604_605_d9_D2 , ave.SF = 1.42
INPUT.p604_605_d9_D2 , ave.SF = 289.77
H3K27me3.p602_d8_D2 , ave.SF = 1
INPUT.p602_d8_D2 , ave.SF = 302.51
H3K27me3.p602_d8_D1 , ave.SF = 1.36
INPUT.p602_d8_D1 , ave.SF = 233.88
[–done–]

#TODO
scale=0.005
for sample_id in V_8_0_untreated_D1_H3K27me3 V_8_0_untreated_D1_input V_8_0_untreated_D2_H3K27me3 V_8_0_untreated_D2_input V_8_1_5_p601_d3_D2_H3K27me3 V_8_1_5_p601_d3_D2_input V_8_1_5_p601_d8_D2_H3K27me3 V_8_1_5_p601_d8_D2_input V_8_1_5_p604_d3_D2_H3K27me3 V_8_1_5_p604_d3_D2_input V_8_1_5_p604_d8_D2_H3K27me3 V_8_1_5_p604_d8_D2_input V_8_1_6_p601_d3_D1_H3K27me3 V_8_1_6_p601_d3_D1_input V_8_1_6_p601_d8_D1_H3K27me3 V_8_1_6_p601_d8_D1_input V_8_1_6_p604_d3_D1_H3K27me3 V_8_1_6_p604_d3_D1_input V_8_1_6_p604_d8_D1_H3K27me3 V_8_1_6_p604_d8_D1_input V_8_2_3_p600_d3_D2_H3K27me3 V_8_2_3_p600_d3_D2_input V_8_2_3_p600_d8_D2_H3K27me3 V_8_2_3_p600_d8_D2_input V_8_2_3_p605_d3_D2_H3K27me3 V_8_2_3_p605_d3_D2_input V_8_2_3_p605_d8_D2_H3K27me3 V_8_2_3_p605_d8_D2_input V_8_2_4_p600_d3_D1_H3K27me3 V_8_2_4_p600_d3_D1_input V_8_2_4_p600_d8_D1_H3K27me3 V_8_2_4_p600_d8_D1_input V_8_2_4_p605_d3_D1_H3K27me3 V_8_2_4_p605_d3_D1_input V_8_2_4_p605_d8_D1_H3K27me3 V_8_2_4_p605_d8_D1_input V_8_3_1_p600_601_d12_D1_H3K27me3 V_8_3_1_p600_601_d12_D1_input V_8_3_1_p604_605_d12_D1_H3K27me3 V_8_3_1_p604_605_d12_D1_input V_8_3_2_p600_601_d9_D2_H3K27me3 V_8_3_2_p600_601_d9_D2_input V_8_3_2_p604_605_d9_D2_H3K27me3 V_8_3_2_p604_605_d9_D2_input V_8_4_1_p602_d8_D2_H3K27me3 V_8_4_1_p602_d8_D2_input V_8_4_2_p602_d8_D1_H3K27me3 V_8_4_2_p602_d8_D1_input; do
#echo “genomeCoverageBed -bg -scale $scale -i ${sample_id}.dedup.sorted.bed -g hg19.chromSizes > ${sample_id}.bedGraph”
#echo “bedGraphToBigWig ${sample_id}.bedGraph hg19.chromSizes ${sample_id}.bw”
cat ${sample_id}.dedup.sorted.bed | wc -l
done

15000000/(19887819*2,46)=0,306597771

>>> 15000000/(9117917*2.27)
>>> 15000000/(15193982*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined

>>> 15000000/(14086858*2.42)
>>> 15000000/(19058379*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined

>>> 15000000/(14179266*2.99)
>>> 15000000/(17897602*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined

#2#
>>> 15000000/(4078851*3.21)
>>> 15000000/(20283412*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined
>>> 15000000/(12246632*2.3)
>>> 15000000/(17484127*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined
>>> 15000000/(5375629*2.0)
>>> 15000000/(18196405*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined

#3#
>>> 15000000/(4028212*2.43)
>>> 15000000/(9777309*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined
>>> 15000000/(1996024*3.64)
>>> 15000000/(13109916*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined
>>> 15000000/(5439084*1.95)
>>> 15000000/(12455769*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined

#4#
>>> 15000000/(4223238*1.83)
>>> 15000000/(14306705*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined
>>> 15000000/(16258718*2.24)
>>> 15000000/(25624031*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined
>>> 15000000/(17673314*1.88)
>>> 15000000/(21605671*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined

#5#
>>> 15000000/(20156038*1.5)
>>> 15000000/(27551196*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined
>>> 15000000/(19584378*1.28)
>>> 15000000/(24649041*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined
>>> 15000000/(4028212*2.43)
>>> 15000000/(25624031*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined

#6#
>>> 15000000/(1996024*3.64)
>>> 15000000/(21605671*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined
>>> 15000000/(20538589*1.99)
>>> 15000000/(27551196*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined
>>> 15000000/(29653756*1.7)
>>> 15000000/(24649041*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined

#7#
>>> 15000000/(13123083*1.88)
>>> 15000000/(24558038*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined
>>> 15000000/(11348597*1.55)
>>> 15000000/(23594386*NA)
Traceback (most recent call last):
File ““, line 1, in
NameError: name ‘NA’ is not defined
>>> 15000000/(29754706*1.52)
>>> 15000000/(4622019*176.16)
0.01842265550189603

#8#
>>> 15000000/(30340171*1.42)
>>> 15000000/(2867648*289.77)
0.018051446022723225
>>> 15000000/(21552600*1.0)
>>> 15000000/(1945885*302.51)
0.025482049392126956
>>> 15000000/(22630562*1.36)
>>> 15000000/(3175236*233.88)
0.020198641637665635

genomeCoverageBed -bg -scale 0.7247192001658386 -i V_8_0_untreated_D1_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_0_untreated_D1_H3K27me3.bedGraph
bedGraphToBigWig V_8_0_untreated_D1_H3K27me3.bedGraph hg19.chromSizes V_8_0_untreated_D1_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_0_untreated_D1_input.dedup.sorted.bed -g hg19.chromSizes > V_8_0_untreated_D1_input.bedGraph
bedGraphToBigWig V_8_0_untreated_D1_input.bedGraph hg19.chromSizes V_8_0_untreated_D1_input.bw
genomeCoverageBed -bg -scale 0.4400091991725917 -i V_8_0_untreated_D2_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_0_untreated_D2_H3K27me3.bedGraph
bedGraphToBigWig V_8_0_untreated_D2_H3K27me3.bedGraph hg19.chromSizes V_8_0_untreated_D2_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_0_untreated_D2_input.dedup.sorted.bed -g hg19.chromSizes > V_8_0_untreated_D2_input.bedGraph
bedGraphToBigWig V_8_0_untreated_D2_input.bedGraph hg19.chromSizes V_8_0_untreated_D2_input.bw
genomeCoverageBed -bg -scale 0.3538069183571812 -i V_8_1_5_p601_d3_D2_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_1_5_p601_d3_D2_H3K27me3.bedGraph
bedGraphToBigWig V_8_1_5_p601_d3_D2_H3K27me3.bedGraph hg19.chromSizes V_8_1_5_p601_d3_D2_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_1_5_p601_d3_D2_input.dedup.sorted.bed -g hg19.chromSizes > V_8_1_5_p601_d3_D2_input.bedGraph
bedGraphToBigWig V_8_1_5_p601_d3_D2_input.bedGraph hg19.chromSizes V_8_1_5_p601_d3_D2_input.bw
#2#
genomeCoverageBed -bg -scale 1.145640572862721 -i V_8_1_5_p601_d8_D2_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_1_5_p601_d8_D2_H3K27me3.bedGraph
bedGraphToBigWig V_8_1_5_p601_d8_D2_H3K27me3.bedGraph hg19.chromSizes V_8_1_5_p601_d8_D2_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_1_5_p601_d8_D2_input.dedup.sorted.bed -g hg19.chromSizes > V_8_1_5_p601_d8_D2_input.bedGraph
bedGraphToBigWig V_8_1_5_p601_d8_D2_input.bedGraph hg19.chromSizes V_8_1_5_p601_d8_D2_input.bw
genomeCoverageBed -bg -scale 0.5325332818390218 -i V_8_1_5_p604_d3_D2_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_1_5_p604_d3_D2_H3K27me3.bedGraph
bedGraphToBigWig V_8_1_5_p604_d3_D2_H3K27me3.bedGraph hg19.chromSizes V_8_1_5_p604_d3_D2_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_1_5_p604_d3_D2_input.dedup.sorted.bed -g hg19.chromSizes > V_8_1_5_p604_d3_D2_input.bedGraph
bedGraphToBigWig V_8_1_5_p604_d3_D2_input.bedGraph hg19.chromSizes V_8_1_5_p604_d3_D2_input.bw
genomeCoverageBed -bg -scale 1.3951855680516643 -i V_8_1_5_p604_d8_D2_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_1_5_p604_d8_D2_H3K27me3.bedGraph
bedGraphToBigWig V_8_1_5_p604_d8_D2_H3K27me3.bedGraph hg19.chromSizes V_8_1_5_p604_d8_D2_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_1_5_p604_d8_D2_input.dedup.sorted.bed -g hg19.chromSizes > V_8_1_5_p604_d8_D2_input.bedGraph
bedGraphToBigWig V_8_1_5_p604_d8_D2_input.bedGraph hg19.chromSizes V_8_1_5_p604_d8_D2_input.bw

#3#
genomeCoverageBed -bg -scale 1.532401846321107 -i V_8_1_6_p601_d3_D1_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_1_6_p601_d3_D1_H3K27me3.bedGraph
bedGraphToBigWig V_8_1_6_p601_d3_D1_H3K27me3.bedGraph hg19.chromSizes V_8_1_6_p601_d3_D1_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_1_6_p601_d3_D1_input.dedup.sorted.bed -g hg19.chromSizes > V_8_1_6_p601_d3_D1_input.bedGraph
bedGraphToBigWig V_8_1_6_p601_d3_D1_input.bedGraph hg19.chromSizes V_8_1_6_p601_d3_D1_input.bw
genomeCoverageBed -bg -scale 2.0645438736603974 -i V_8_1_6_p601_d8_D1_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_1_6_p601_d8_D1_H3K27me3.bedGraph
bedGraphToBigWig V_8_1_6_p601_d8_D1_H3K27me3.bedGraph hg19.chromSizes V_8_1_6_p601_d8_D1_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_1_6_p601_d8_D1_input.dedup.sorted.bed -g hg19.chromSizes > V_8_1_6_p601_d8_D1_input.bedGraph
bedGraphToBigWig V_8_1_6_p601_d8_D1_input.bedGraph hg19.chromSizes V_8_1_6_p601_d8_D1_input.bw
genomeCoverageBed -bg -scale 1.4142652866379142 -i V_8_1_6_p604_d3_D1_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_1_6_p604_d3_D1_H3K27me3.bedGraph
bedGraphToBigWig V_8_1_6_p604_d3_D1_H3K27me3.bedGraph hg19.chromSizes V_8_1_6_p604_d3_D1_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_1_6_p604_d3_D1_input.dedup.sorted.bed -g hg19.chromSizes > V_8_1_6_p604_d3_D1_input.bedGraph
bedGraphToBigWig V_8_1_6_p604_d3_D1_input.bedGraph hg19.chromSizes V_8_1_6_p604_d3_D1_input.bw

#4#
genomeCoverageBed -bg -scale 1.940861801176114 -i V_8_1_6_p604_d8_D1_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_1_6_p604_d8_D1_H3K27me3.bedGraph
bedGraphToBigWig V_8_1_6_p604_d8_D1_H3K27me3.bedGraph hg19.chromSizes V_8_1_6_p604_d8_D1_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_1_6_p604_d8_D1_input.dedup.sorted.bed -g hg19.chromSizes > V_8_1_6_p604_d8_D1_input.bedGraph
bedGraphToBigWig V_8_1_6_p604_d8_D1_input.bedGraph hg19.chromSizes V_8_1_6_p604_d8_D1_input.bw
genomeCoverageBed -bg -scale 0.411866948638175 -i V_8_2_3_p600_d3_D2_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_2_3_p600_d3_D2_H3K27me3.bedGraph
bedGraphToBigWig V_8_2_3_p600_d3_D2_H3K27me3.bedGraph hg19.chromSizes V_8_2_3_p600_d3_D2_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_2_3_p600_d3_D2_input.dedup.sorted.bed -g hg19.chromSizes > V_8_2_3_p600_d3_D2_input.bedGraph
bedGraphToBigWig V_8_2_3_p600_d3_D2_input.bedGraph hg19.chromSizes V_8_2_3_p600_d3_D2_input.bw
genomeCoverageBed -bg -scale 0.4514559863676569 -i V_8_2_3_p600_d8_D2_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_2_3_p600_d8_D2_H3K27me3.bedGraph
bedGraphToBigWig V_8_2_3_p600_d8_D2_H3K27me3.bedGraph hg19.chromSizes V_8_2_3_p600_d8_D2_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_2_3_p600_d8_D2_input.dedup.sorted.bed -g hg19.chromSizes > V_8_2_3_p600_d8_D2_input.bedGraph
bedGraphToBigWig V_8_2_3_p600_d8_D2_input.bedGraph hg19.chromSizes V_8_2_3_p600_d8_D2_input.bw

#5#
genomeCoverageBed -bg -scale 0.49612924921058393 -i V_8_2_3_p605_d3_D2_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_2_3_p605_d3_D2_H3K27me3.bedGraph
bedGraphToBigWig V_8_2_3_p605_d3_D2_H3K27me3.bedGraph hg19.chromSizes V_8_2_3_p605_d3_D2_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_2_3_p605_d3_D2_input.dedup.sorted.bed -g hg19.chromSizes > V_8_2_3_p605_d3_D2_input.bedGraph
bedGraphToBigWig V_8_2_3_p605_d3_D2_input.bedGraph hg19.chromSizes V_8_2_3_p605_d3_D2_input.bw
genomeCoverageBed -bg -scale 0.5983723353378902 -i V_8_2_3_p605_d8_D2_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_2_3_p605_d8_D2_H3K27me3.bedGraph
bedGraphToBigWig V_8_2_3_p605_d8_D2_H3K27me3.bedGraph hg19.chromSizes V_8_2_3_p605_d8_D2_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_2_3_p605_d8_D2_input.dedup.sorted.bed -g hg19.chromSizes > V_8_2_3_p605_d8_D2_input.bedGraph
bedGraphToBigWig V_8_2_3_p605_d8_D2_input.bedGraph hg19.chromSizes V_8_2_3_p605_d8_D2_input.bw
genomeCoverageBed -bg -scale 1.532401846321107 -i V_8_2_4_p600_d3_D1_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_2_4_p600_d3_D1_H3K27me3.bedGraph
bedGraphToBigWig V_8_2_4_p600_d3_D1_H3K27me3.bedGraph hg19.chromSizes V_8_2_4_p600_d3_D1_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_2_4_p600_d3_D1_input.dedup.sorted.bed -g hg19.chromSizes > V_8_2_4_p600_d3_D1_input.bedGraph
bedGraphToBigWig V_8_2_4_p600_d3_D1_input.bedGraph hg19.chromSizes V_8_2_4_p600_d3_D1_input.bw

#6#
genomeCoverageBed -bg -scale 2.0645438736603974 -i V_8_2_4_p600_d8_D1_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_2_4_p600_d8_D1_H3K27me3.bedGraph
bedGraphToBigWig V_8_2_4_p600_d8_D1_H3K27me3.bedGraph hg19.chromSizes V_8_2_4_p600_d8_D1_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_2_4_p600_d8_D1_input.dedup.sorted.bed -g hg19.chromSizes > V_8_2_4_p600_d8_D1_input.bedGraph
bedGraphToBigWig V_8_2_4_p600_d8_D1_input.bedGraph hg19.chromSizes V_8_2_4_p600_d8_D1_input.bw
genomeCoverageBed -bg -scale 0.3670012795042082 -i V_8_2_4_p605_d3_D1_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_2_4_p605_d3_D1_H3K27me3.bedGraph
bedGraphToBigWig V_8_2_4_p605_d3_D1_H3K27me3.bedGraph hg19.chromSizes V_8_2_4_p605_d3_D1_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_2_4_p605_d3_D1_input.dedup.sorted.bed -g hg19.chromSizes > V_8_2_4_p605_d3_D1_input.bedGraph
bedGraphToBigWig V_8_2_4_p605_d3_D1_input.bedGraph hg19.chromSizes V_8_2_4_p605_d3_D1_input.bw
genomeCoverageBed -bg -scale 0.29755183160489707 -i V_8_2_4_p605_d8_D1_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_2_4_p605_d8_D1_H3K27me3.bedGraph
bedGraphToBigWig V_8_2_4_p605_d8_D1_H3K27me3.bedGraph hg19.chromSizes V_8_2_4_p605_d8_D1_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_2_4_p605_d8_D1_input.dedup.sorted.bed -g hg19.chromSizes > V_8_2_4_p605_d8_D1_input.bedGraph
bedGraphToBigWig V_8_2_4_p605_d8_D1_input.bedGraph hg19.chromSizes V_8_2_4_p605_d8_D1_input.bw

#7#
genomeCoverageBed -bg -scale 0.6079915370690957 -i V_8_3_1_p600_601_d12_D1_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_3_1_p600_601_d12_D1_H3K27me3.bedGraph
bedGraphToBigWig V_8_3_1_p600_601_d12_D1_H3K27me3.bedGraph hg19.chromSizes V_8_3_1_p600_601_d12_D1_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_3_1_p600_601_d12_D1_input.dedup.sorted.bed -g hg19.chromSizes > V_8_3_1_p600_601_d12_D1_input.bedGraph
bedGraphToBigWig V_8_3_1_p600_601_d12_D1_input.bedGraph hg19.chromSizes V_8_3_1_p600_601_d12_D1_input.bw
genomeCoverageBed -bg -scale 0.8527414758704278 -i V_8_3_1_p604_605_d12_D1_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_3_1_p604_605_d12_D1_H3K27me3.bedGraph
bedGraphToBigWig V_8_3_1_p604_605_d12_D1_H3K27me3.bedGraph hg19.chromSizes V_8_3_1_p604_605_d12_D1_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_3_1_p604_605_d12_D1_input.dedup.sorted.bed -g hg19.chromSizes > V_8_3_1_p604_605_d12_D1_input.bedGraph
bedGraphToBigWig V_8_3_1_p604_605_d12_D1_input.bedGraph hg19.chromSizes V_8_3_1_p604_605_d12_D1_input.bw
genomeCoverageBed -bg -scale 0.3316591685574571 -i V_8_3_2_p600_601_d9_D2_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_3_2_p600_601_d9_D2_H3K27me3.bedGraph
bedGraphToBigWig V_8_3_2_p600_601_d9_D2_H3K27me3.bedGraph hg19.chromSizes V_8_3_2_p600_601_d9_D2_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_3_2_p600_601_d9_D2_input.dedup.sorted.bed -g hg19.chromSizes > V_8_3_2_p600_601_d9_D2_input.bedGraph
bedGraphToBigWig V_8_3_2_p600_601_d9_D2_input.bedGraph hg19.chromSizes V_8_3_2_p600_601_d9_D2_input.bw

#8#
genomeCoverageBed -bg -scale 0.3481648235169848 -i V_8_3_2_p604_605_d9_D2_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_3_2_p604_605_d9_D2_H3K27me3.bedGraph
bedGraphToBigWig V_8_3_2_p604_605_d9_D2_H3K27me3.bedGraph hg19.chromSizes V_8_3_2_p604_605_d9_D2_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_3_2_p604_605_d9_D2_input.dedup.sorted.bed -g hg19.chromSizes > V_8_3_2_p604_605_d9_D2_input.bedGraph
bedGraphToBigWig V_8_3_2_p604_605_d9_D2_input.bedGraph hg19.chromSizes V_8_3_2_p604_605_d9_D2_input.bw
genomeCoverageBed -bg -scale 0.6959717157094736 -i V_8_4_1_p602_d8_D2_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_4_1_p602_d8_D2_H3K27me3.bedGraph
bedGraphToBigWig V_8_4_1_p602_d8_D2_H3K27me3.bedGraph hg19.chromSizes V_8_4_1_p602_d8_D2_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_4_1_p602_d8_D2_input.dedup.sorted.bed -g hg19.chromSizes > V_8_4_1_p602_d8_D2_input.bedGraph
bedGraphToBigWig V_8_4_1_p602_d8_D2_input.bedGraph hg19.chromSizes V_8_4_1_p602_d8_D2_input.bw
genomeCoverageBed -bg -scale 0.4873680010556468 -i V_8_4_2_p602_d8_D1_H3K27me3.dedup.sorted.bed -g hg19.chromSizes > V_8_4_2_p602_d8_D1_H3K27me3.bedGraph
bedGraphToBigWig V_8_4_2_p602_d8_D1_H3K27me3.bedGraph hg19.chromSizes V_8_4_2_p602_d8_D1_H3K27me3.bw
genomeCoverageBed -bg -scale 0.02 -i V_8_4_2_p602_d8_D1_input.dedup.sorted.bed -g hg19.chromSizes > V_8_4_2_p602_d8_D1_input.bedGraph
bedGraphToBigWig V_8_4_2_p602_d8_D1_input.bedGraph hg19.chromSizes V_8_4_2_p602_d8_D1_input.bw

#./V_8_3_2_p600_601_d9_D2_H3K4me3.dedup.sorted.bed
#15000000/(19887819*2,46)=0,306597771
scale=0.306597771
genomeCoverageBed -bg -scale $scale -i V_8_3_2_p600_601_d9_D2_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > V_8_3_2_p600_601_d9_D2_H3K4me3.bedGraph
bedGraphToBigWig V_8_3_2_p600_601_d9_D2_H3K4me3.bedGraph hg19.chromSizes V_8_3_2_p600_601_d9_D2_H3K4me3.bw

#./V_8_1_5_p601_d8_D2_H3K4me3.dedup.sorted.bed
#15000000/(11143929*3,74)=0,359899564
scale=0.359899564
genomeCoverageBed -bg -scale $scale -i V_8_1_5_p601_d8_D2_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > V_8_1_5_p601_d8_D2_H3K4me3.bedGraph
bedGraphToBigWig V_8_1_5_p601_d8_D2_H3K4me3.bedGraph hg19.chromSizes V_8_1_5_p601_d8_D2_H3K4me3.bw

#./V_8_3_1_p600_601_d12_D1_H3K4me3.dedup.sorted.bed
#15000000/(11175216*2,51)=0,534763321
scale=0.534763321
genomeCoverageBed -bg -scale $scale -i V_8_3_1_p600_601_d12_D1_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > V_8_3_1_p600_601_d12_D1_H3K4me3.bedGraph
bedGraphToBigWig V_8_3_1_p600_601_d12_D1_H3K4me3.bedGraph hg19.chromSizes V_8_3_1_p600_601_d12_D1_H3K4me3.bw

#./V_8_0_untreated_D1_H3K4me3.dedup.sorted.bed
#15000000/(9830800*3,74)=0,407972412
scale=0.407972412
genomeCoverageBed -bg -scale $scale -i V_8_0_untreated_D1_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > V_8_0_untreated_D1_H3K4me3.bedGraph
bedGraphToBigWig V_8_0_untreated_D1_H3K4me3.bedGraph hg19.chromSizes V_8_0_untreated_D1_H3K4me3.bw

#./V_8_1_6_p601_d8_D1_H3K4me3.dedup.sorted.bed
#15000000/(6208322*3,77)=0,64087846
scale=0.64087846
genomeCoverageBed -bg -scale $scale -i V_8_1_6_p601_d8_D1_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > V_8_1_6_p601_d8_D1_H3K4me3.bedGraph
bedGraphToBigWig V_8_1_6_p601_d8_D1_H3K4me3.bedGraph hg19.chromSizes V_8_1_6_p601_d8_D1_H3K4me3.bw

#./V_8_0_untreated_D2_H3K4me3.dedup.sorted.bed
#15000000/(11028176*3,13)=0,434553481
scale=0.434553481
genomeCoverageBed -bg -scale $scale -i V_8_0_untreated_D2_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > V_8_0_untreated_D2_H3K4me3.bedGraph
bedGraphToBigWig V_8_0_untreated_D2_H3K4me3.bedGraph hg19.chromSizes V_8_0_untreated_D2_H3K4me3.bw

#lrwxrwxrwx 1 jhuang jhuang 95 Sep 16 14:21 V_8_1_6_p601_d8_D1_H3K4me3.fastq.gz -> ../Raw_Data_orig/200226_NB501882_0182_AHV3YWBGXC/nf194/8_1_6_601_d8_H3K4me3_S13_R1_001.fastq.gz
#lrwxrwxrwx 1 jhuang jhuang 95 Sep 16 14:24 V_8_2_4_p600_d8_D1_H3K4me3.fastq.gz -> ../Raw_Data_orig/200226_NB501882_0182_AHV3YWBGXC/nf194/8_1_6_601_d8_H3K4me3_S13_R1_001.fastq.gz
#-rw-rw-r– 1 jhuang jhuang 421M Sep 19 14:08 V_8_1_6_p601_d8_D1_H3K4me3.dedup.sorted.bed
#-rw-rw-r– 1 jhuang jhuang 421M Sep 19 17:55 V_8_2_4_p600_d8_D1_H3K4me3.dedup.sorted.bed
#./V_8_2_4_p600_d8_D1_H3K4me3.dedup.sorted.bed
#15000000/(6208322*3,77)=0,64087846
scale=0.64087846
genomeCoverageBed -bg -scale $scale -i V_8_2_4_p600_d8_D1_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > V_8_2_4_p600_d8_D1_H3K4me3.bedGraph
bedGraphToBigWig V_8_2_4_p600_d8_D1_H3K4me3.bedGraph hg19.chromSizes V_8_2_4_p600_d8_D1_H3K4me3.bw

#./V_8_2_3_p600_d8_D2_H3K4me3.dedup.sorted.bed
#15000000/(15228808*3,65)=0,269856251
scale=0.269856251
genomeCoverageBed -bg -scale $scale -i V_8_2_3_p600_d8_D2_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > V_8_2_3_p600_d8_D2_H3K4me3.bedGraph
bedGraphToBigWig V_8_2_3_p600_d8_D2_H3K4me3.bedGraph hg19.chromSizes V_8_2_3_p600_d8_D2_H3K4me3.bw

#Due to the input files not having the signicant signal, they are normalized with an estimated scale factor (=0.02).

#cat p602_d8_D2_H3K4me3.dedup.sorted.bed|wc -l
#15000000/(1945885*263,75)=0,029226824
#scale=0.029226824
#genomeCoverageBed -bg -scale $scale -i p602_d8_D2_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > p602_d8_D2_H3K4me3.bedGraph
#bedGraphToBigWig p602_d8_D2_H3K4me3.bedGraph hg19.chromSizes p602_d8_D2_H3K4me3.bw
#15000000/(4622019*153,6)=0,021128483

scale=0.02
for sample_id in V_8_3_2_p600_601_d9_D2_input V_8_2_4_p600_d8_D1_input V_8_1_5_p601_d8_D2_input V_8_0_untreated_D1_input V_8_3_1_p604_605_d12_D1_input V_8_0_untreated_D2_input V_8_2_4_p605_d8_D1_input V_8_1_6_p604_d8_D1_input V_8_3_1_p600_601_d12_D1_input V_8_1_5_p604_d8_D2_input V_8_1_6_p601_d8_D1_input V_8_2_3_p605_d8_D2_input V_8_3_2_p604_605_d9_D2_input V_8_4_2_p602_d8_D1_input V_8_2_3_p600_d8_D2_input V_8_4_1_p602_d8_D2_input; do
genomeCoverageBed -bg -scale $scale -i ${sample_id}.dedup.sorted.bed -g hg19.chromSizes > ${sample_id}.bedGraph
bedGraphToBigWig ${sample_id}.bedGraph hg19.chromSizes ${sample_id}.bw
done

Reporting summary
H3K4me3.LT , ave.SF = 2.353
H3K4me3.LTtr , ave.SF = 2.77
H3K4me3.sT , ave.SF = 2.86
H3K4me3.sT_LTtr , ave.SF = 2.605
INPUT.untreated , ave.SF = NA

H3K4me3.LT_D1 , ave.SF = 2.87 p602_d8_D1
H3K4me3.LT_D2 , ave.SF = 1 p602_d8_D2
H3K4me3.LTtr_D1 , ave.SF = 2.74 p605_d8_D1
H3K4me3.LTtr_D2 , ave.SF = 2.8 p605_d8_D2

H3K4me3.sT_D1 , ave.SF = 2.67 p604_d8_D1
H3K4me3.sT_D2 , ave.SF = 3.56 p604_d8_D2
H3K4me3.sT_LTtr_D1 , ave.SF = 2.44 p604_605_d12_D1
H3K4me3.sT_LTtr_D2 , ave.SF = 2.77 p604_605_d9_D2
INPUT.untreated_D1 , ave.SF = NA
INPUT.untreated_D2 , ave.SF = NA

Reporting summary
H3K27me3.p602_d8_D1 , ave.SF = 1.36
H3K27me3.p602_d8_D2 , ave.SF = 1
H3K27me3.p605_d8_D1 , ave.SF = 1.7
H3K27me3.p605_d8_D2 , ave.SF = 1.28

H3K27me3.p604_d8_D1 , ave.SF = 1.83
H3K27me3.p604_d8_D2 , ave.SF = 2.2
H3K27me3.p604_605_d12_D1 , ave.SF = 1.55
H3K27me3.p604_605_d9_D2 , ave.SF = 1.41
INPUT.untreated_D1 , ave.SF = NA
INPUT.untreated_D2 , ave.SF = NA
[–done–]

cat p602_d8_D1.dedup.sorted.bed|wc -l
15000000/(5908897*2,67)=0,950765858
scale=0.950765858
genomeCoverageBed -bg -scale $scale -i p604_d8_D1_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > p604_d8_D1_H3K4me3.bedGraph
bedGraphToBigWig p604_d8_D1_H3K4me3.bedGraph hg19.chromSizes p604_d8_D1_H3K4me3.bw

# —-
dat <- read.table("test_SF.txt", sep="\t",header=TRUE,fill=TRUE,stringsAsFactors = FALSE, quote="",check.names=F) SF <- dat$SF #The libSize vector represents the column (sample specific) sums of features, i.e. the total number of reads for a sample or depth of coverage. It is used by fitZig. #https://bedops.readthedocs.io/en/latest/content/reference/statistics/bedmap.html #15730156 (15730156 is the total number of mapped reads). libSize=`cat p602_d8_D1_H3K4me3.dedup.sorted.bed|wc -l` SF=2.87 scale=`15000000/($libSize*$SF)` 15000000/(15730156*2,87)=0,332258678 scale=0.332258678 genomeCoverageBed -bg -scale $scale -i p602_d8_D1_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > p602_d8_D1_H3K4me3.bedGraph
bedGraphToBigWig p602_d8_D1_H3K4me3.bedGraph hg19.chromSizes p602_d8_D1_H3K4me3.bw
cat p602_d8_D2_H3K4me3.dedup.sorted.bed|wc -l
15000000/(28496276*1)=0,52638457
scale=0.52638457
genomeCoverageBed -bg -scale $scale -i p602_d8_D2_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > p602_d8_D2_H3K4me3.bedGraph
bedGraphToBigWig p602_d8_D2_H3K4me3.bedGraph hg19.chromSizes p602_d8_D2_H3K4me3.bw
cat p605_d8_D1_H3K4me3.dedup.sorted.bed|wc -l
15000000/(20580696*2,74)=0,265999389
scale=0.265999389
genomeCoverageBed -bg -scale $scale -i p605_d8_D1_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > p605_d8_D1_H3K4me3.bedGraph
bedGraphToBigWig p605_d8_D1_H3K4me3.bedGraph hg19.chromSizes p605_d8_D1_H3K4me3.bw
cat p605_d8_D2_H3K4me3.dedup.sorted.bed|wc -l
15000000/(19899357*2,8)=0,269211857
scale=0.269211857
genomeCoverageBed -bg -scale $scale -i p605_d8_D2_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > p605_d8_D2_H3K4me3.bedGraph
bedGraphToBigWig p605_d8_D2_H3K4me3.bedGraph hg19.chromSizes p605_d8_D2_H3K4me3.bw

cat p604_d8_D1_H3K4me3.dedup.sorted.bed|wc -l
15000000/(5908897*2,67)=0,950765858
scale=0.950765858
genomeCoverageBed -bg -scale $scale -i p604_d8_D1_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > p604_d8_D1_H3K4me3.bedGraph
bedGraphToBigWig p604_d8_D1_H3K4me3.bedGraph hg19.chromSizes p604_d8_D1_H3K4me3.bw
cat p604_d8_D2_H3K4me3.dedup.sorted.bed|wc -l
15000000/(12671796*3,56)=0,332508758
scale=0.332508758
genomeCoverageBed -bg -scale $scale -i p604_d8_D2_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > p604_d8_D2_H3K4me3.bedGraph
bedGraphToBigWig p604_d8_D2_H3K4me3.bedGraph hg19.chromSizes p604_d8_D2_H3K4me3.bw
cat p604_605_d12_D1_H3K4me3.dedup.sorted.bed|wc -l
15000000/(13541815*2,44)=0,453967285
scale=0.453967285
genomeCoverageBed -bg -scale $scale -i p604_605_d12_D1_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > p604_605_d12_D1_H3K4me3.bedGraph
bedGraphToBigWig p604_605_d12_D1_H3K4me3.bedGraph hg19.chromSizes p604_605_d12_D1_H3K4me3.bw
cat p604_605_d9_D2_H3K4me3.dedup.sorted.bed|wc -l
15000000/(21675907*2,77)=0,249824031
scale=0.249824031
genomeCoverageBed -bg -scale $scale -i p604_605_d9_D2_H3K4me3.dedup.sorted.bed -g hg19.chromSizes > p604_605_d9_D2_H3K4me3.bedGraph
bedGraphToBigWig p604_605_d9_D2_H3K4me3.bedGraph hg19.chromSizes p604_605_d9_D2_H3K4me3.bw

#0.25 for untreated
scale=0.25
genomeCoverageBed -bg -scale $scale -i V_8_0_untreated_D1_input.dedup.sorted.bed -g hg19.chromSizes > untreated_D1_input.bedGraph
bedGraphToBigWig untreated_D1_input.bedGraph hg19.chromSizes untreated_D1_input.bw
genomeCoverageBed -bg -scale $scale -i V_8_0_untreated_D2_input.dedup.sorted.bed -g hg19.chromSizes > untreated_D2_input.bedGraph
bedGraphToBigWig untreated_D2_input.bedGraph hg19.chromSizes untreated_D2_input.bw

Leave a Reply

Your email address will not be published. Required fields are marked *