nservant / HiC-Pro

HiC-Pro: An optimized and flexible pipeline for Hi-C data processing
Other
386 stars 182 forks source link

how to run -s ice_norm command directly from .matrix #303

Closed KunFang93 closed 4 years ago

KunFang93 commented 4 years ago

Hi,

I extract .matrix file from cooler, it looks like 0 0 1 1 1 5 1 15167 1 1 22076 1 1 35903 1 1 58519 1 1 66496 1 2 2 1 3 20314 1 3 43580 1 5 5 1

However, when I run _bin/HiC-Pro -i /backup/kun/Lava/Matrix/ND18378-02_S3/raw/40000/ND18378-02_S3_40000.matrix -o /backup/kun/Lava/Hicup_result/kit_qc/ND18378-02_S3_40000_iced.matrix -c /backup/kun/Lava/Hicpro_topdom/config-hicpro.txt -s icenorm

The Error message pop up: Exit: Error: Directory Hierarchy of rawdata '/backup/kun/Lava/Matrix/ND18378-02_S3/raw/40000/ND18378-02_S3_40000.matrix' is not correct. No '.matrix' files detected

I was wondering how can I solve this problem? Thanks a lot!

Kun

nservant commented 4 years ago

Hi Even in stepwise mode, HiC-pro expects an input folder with one sub-folder per sample containing the data. So in theroy, you should build a new input folder, but I think taht -i /backup/kun/Lava/Matrix might work. Not that if this is more convenient for you, I would advice to directly use the script/ice_norm script.

KunFang93 commented 4 years ago

Thanks for your reply! I might try to use ice_norm.sh directly. I was wondering whether you could give a little bit explanation of what is $1 and $2 in the ice_norm.sh?

nservant commented 4 years ago

I would suggest to use the ice script which is created after HiC-Pro installation (and compilation). The man is clearer. Note that the different parameters are set in the HiC-Pro config file if needeed.

scripts/ice -h
usage: ICE normalization [-h] [--results_filename RESULTS_FILENAME]
                         [--filtering_perc FILTERING_PERC]
                         [--filter_low_counts_perc FILTER_LOW_COUNTS_PERC]
                         [--filter_high_counts_perc FILTER_HIGH_COUNTS_PERC]
                         [--remove-all-zeros-loci] [--max_iter MAX_ITER]
                         [--eps EPS] [--dense] [--output-bias OUTPUT_BIAS]
                         [--verbose VERBOSE]
                         File to load

positional arguments:
  File to load          Path to file of contact counts to load

optional arguments:
  -h, --help            show this help message and exit
  --results_filename RESULTS_FILENAME, -r RESULTS_FILENAME
                        results_filename
  --filtering_perc FILTERING_PERC, -f FILTERING_PERC
                        Percentage of reads to filter out
  --filter_low_counts_perc FILTER_LOW_COUNTS_PERC
                        Percentage of reads to filter out
  --filter_high_counts_perc FILTER_HIGH_COUNTS_PERC
                        Percentage of reads to filter out
  --remove-all-zeros-loci
                        If provided, all non-interacting loci will be removed
                        prior to the filtering strategy chosen.
  --max_iter MAX_ITER, -m MAX_ITER
                        Maximum number of iterations
  --eps EPS, -e EPS     Precision
  --dense, -d
  --output-bias OUTPUT_BIAS, -b OUTPUT_BIAS
                        Output the bias vector
  --verbose VERBOSE, -v VERBOSE
KunFang93 commented 4 years ago

Wow~I didn't know it before. Thanks a lot!