Hi, I created fragment and interaction files from a high resolution (1kb) .cool file and fit into HiCKRy to generate bias file, then run fithic. Since I am only interested in intra-chromosomal interactions, to reduce the memory and time for run, I want to perform the whole process chromosome by chromosome, then merge the results at end and performed fdr correction on p-value. The code to run process chr-by-chr is listed below
```
# cooler dump (it will only dump intra-chromosomal)
cooler dump --join -r $chr $cool_file > cooler_dump.bedpe
# create int.txt.gz
awk 'BEGIN{OFS="\t"; FS="\t"}{print $1,$2,$4,$5,$7}' cooler_dump.bedpe | gzip > $chr"_int.txt.gz"
# create frag.txt.gz
zcat $chr"_int.txt.gz" | awk 'BEGIN{OFS="\t"; FS="\t"}{a[$1"\t0\t"$2]+=$5; a[$3"\t0\t"$4]+=$5;}END{for (coord in a) { print coord, a[coord],1 }}' | sort -k1,2n | gzip > $chr"_frag.txt.gz"
# create KRbias.txt.gz
python /mnt/isilon/sfgi/programs/fithic/fithic/utils/HiCKRy.py -i $chr"_int.txt.gz" -f $chr"_frag.txt.gz" -o $chr"_KRbias.txt.gz"
# run fithic
fithic -i $chr"_int.txt.gz" \
-f $chr"_frag.txt.gz" \
-o ./ \
-r 1000 \
-t $chr"_KRbias.txt.gz \
-x intraOnly
I have two questions:
1) will excluding inter-chromosomal contacts in fragment and Interaction files cause the bias on HiCKRy bias value generation? Is it wrong to do so?
2) If 1) is wrong, what if I create full interaction-fragment-bias set by including inter-chromosomal contacts for each chromosome, then run fithic chromosome-by-chromosome, is it acceptable?
Thank you,
Chun