ay-lab / FitHiChIP

Statistically Significant loops from HiChIP data
MIT License
39 stars 20 forks source link

Singularity #79

Closed pna059 closed 2 years ago

pna059 commented 2 years ago

Hi, I am using FitHiChIP for Hi-C data with recommended settings (IntType=4, BiasType=2). Using the HiC-Pro version throws me constantly errors at the ICE normalization step.

 ================ Computing bias statistics - ICE bias will be employed =================

 *** ICE computation Executable: /home/pavlan/tools/miniconda3/bin/ice
*** Computing ICE based bias vector from the HiC-pro contact matrix
/home/pavlan/tools/miniconda3/bin/ice:65: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if "--filtering_perc" is None and "--filter_low_counts_perc" not in sys.argv:
/home/pavlan/tools/miniconda3/lib/python3.8/site-packages/iced/normalization/_ca_utils.py:8: UserWarning: The API of this module is likely to change. Use only for testi
ng purposes
  warnings.warn(
Assuming the file is 1-based. If this is not the desired option, set option --base to 0
======== Appended ICE bias information for individual genomic bins
======== Computed bias statistics - file : /auto/budejovice1/home/pavlan/FitHiChIP_leaf2_20k/NormFeatures/ICE_Bias/FitHiChIP_leaf2_20k.coverage_ICE_Bias.bed

 ================ creating full feature file for FitHiChIP =================

======== Created full feature file : /auto/budejovice1/home/pavlan/FitHiChIP_leaf2_20k/NormFeatures/ICE_Bias/FitHiChIP_leaf2_20k.AllBin_CompleteFeat_ICE.bed

 ================ Generating interactions + features for significance estimation =================

Input interaction file: /auto/budejovice1/home/pavlan/FitHiChIP_leaf2_20k/HiCPro_Matrix_BinSize20000/L_10000_U2000000/FitHiChIP_leaf2_20k.cis.interactions.DistThr.bed
Output file: /auto/budejovice1/home/pavlan/FitHiChIP_leaf2_20k/FitHiChIP_ALL2ALL_b20000_L10000_U2000000/ICE_Bias/Interactions.bed
File storing the normalization features for individual genomic intervals: /auto/budejovice1/home/pavlan/FitHiChIP_leaf2_20k/NormFeatures/ICE_Bias/FitHiChIP_leaf2_20k.AllBin_CompleteFeat_ICE.bed
File of chromosome sizes: /home/pavlan/Juicer_dir/chrom_sizes/hv03.chrSizes

 Output directory: /auto/budejovice1/home/pavlan/FitHiChIP_leaf2_20k/FitHiChIP_ALL2ALL_b20000_L10000_U2000000/ICE_Bias

 Processing chromosome for interaction features: chr1H  --- number of bin pairs with nonzero contacts for this chromosome : 222369
 Processing chromosome for interaction features: chr2H  --- number of bin pairs with nonzero contacts for this chromosome : 296296
 Processing chromosome for interaction features: chr3H  --- number of bin pairs with nonzero contacts for this chromosome : 273614
 Processing chromosome for interaction features: chr4H  --- number of bin pairs with nonzero contacts for this chromosome : 295579
 Processing chromosome for interaction features: chr5H  --- number of bin pairs with nonzero contacts for this chromosome : 255796
 Processing chromosome for interaction features: chr6H  --- number of bin pairs with nonzero contacts for this chromosome : 254133
 Processing chromosome for interaction features: chr7H  --- number of bin pairs with nonzero contacts for this chromosome : 274902 Contact count col: 7
cat: /auto/budejovice1/home/pavlan/FitHiChIP_leaf2_20k/FitHiChIP_ALL2ALL_b20000_L10000_U2000000/ICE_Bias/Interactions.bed: No such file or directory

So I tried to use the singularity version:

bash ~/tools/FitHiChIP/FitHiChIP_Singularity.sh -C ~/tools/FitHiChIP_configs/configfile_A2A_BiasCorrection_ICEbias_leaf2

 ================ Verifying input configuration parameters =================
***** Specified output directory : /auto/budejovice1/home/pavlan/FitHiChIP_leaf2_20k
HiC-pro is installed in the system
Installed HiC-pro version: 3.0.0
Installed python version: 3.8.5
*** Python library gzip is installed
*** Python module OptionParser (from the package optparse) is installed
*** Python package networkx is installed
*** Found MACS2 package (for peak calling) installed in the system -  line
Installed R version: 4.0.0
Installed samtools version: 1.11
*** bgzip utility is installed in the system
*** tabix utility is installed in the system
Installed bedtools version: 2.26.0
INFO:    Using cached image

 ================ Parsing input configuration file =================
Content of ValidPairs is /storage/praha5-elixir/home/pavlan/Barley_HiCPro_results_leaf2/hic_results/data/leaf2/leaf2.allValidPairs
Content of Interval is /storage/praha5-elixir/home/pavlan/Barley_HiCPro_results_leaf2/hic_results/matrix/leaf2/raw/5000/leaf2_5000_abs.bed
Content of Matrix is /storage/praha5-elixir/home/pavlan/Barley_HiCPro_results_leaf2/hic_results/matrix/leaf2/iced/5000/leaf2_5000_iced.matrix
Content of Bed is
Content of PeakFile is
Content of OutDir is /auto/budejovice1/home/pavlan/FitHiChIP_leaf2_20k
Content of IntType is 4
Content of BINSIZE is 20000
Content of LowDistThr is 10000
Content of UppDistThr is 2000000
Content of UseP2PBackgrnd is 0
Content of BiasType is 2
Content of MergeInt is 1
Content of QVALUE is 0.05
Content of ChrSizeFile is /home/pavlan/Juicer_dir/chrom_sizes/hv03.chrSizes
Content of PREFIX is FitHiChIP_leaf2_20k
Content of OverWrite is 1

 ================ Verifying input configuration parameters =================
User should provide a reference peak file (either ChIP or HiChIP) to compute the interactions involving peak segments - exit !!

1) I was surprised that the dependencies were requested before the singularity image was generated 2) The peak file should not be needed under these settings

I cannot get past the ICE normalization with or without singularity. Could you please hint me to a fix?

ay-lab commented 2 years ago

Hi @pna059 Thanks for your query. Unfortunately, the singularity version needs to be updated. Please use the "git clone" to download the latest code and install the required dependencies.

However, for calling Hi-C loops, I'd suggest using our Hi-C loop caller FitHiC2 (https://github.com/ay-lab/fithic) instead of FitHiChIP. A step-by-step guide for running FitHiC2 is also available in our nature protocol paper (https://www.nature.com/articles/s41596-019-0273-0).

Of course, you are welcome to run FitHiChIP using the parameters you've mentioned and compare it with FitHiC2 results. You can share with us any specific observations or suggestions regarding such benchmarking.

ay-lab commented 1 year ago

Hi @pna059 We have updated the Singularity version in the latest release. Please check if it resolves the issue.