Closed Rseq closed 4 years ago
Hi, thank you for the bug report - I encountered this issue myself over the weekend and have already implemented a fix, which will be available shortly. I'll post a comment here when there is a new version!
You can upgrade to FAN-C version 0.8.20
now, which should fix the issue you were seeing. Please let me know if you encounter this issue again!
Hi, thanks for the prompt reply! And for the quick fix!
Does it mean that this is already fixed if I pull in Github or pip should do the trick as well?
A different issue is also preventing me from doing the same using juicebox .hic as input.
Both git pull
and pip install --upgrade fanc
should work. Can you post the Juicer issue separately, so I can have a look, please?
Hi,
I did as you told and I upgrade it. It is running until a certain point that crashes:
$ fanc auto '/media/test/Data/Data/HiC/HiC_fused_150_PE/HiCPro_HiC_fused_150_PE/hic_results/data/K5_test_EtOH/K5_test_EtOH.allValidPairs' -g '/media/test/Data/Genomes_ref/bowtie2/Hsapiens/digested_ref/DpnII_resfrag_hg19.bed' '/media/test/Data/Data/HiC/HiC_fused_150_PE/FANC'
2020-02-17 12:47:22,627 INFO Output folder: /media/test/Data/Data/HiC/HiC_fused_150_PE/FANC/
2020-02-17 12:47:22,627 INFO Input files: /media/test/Data/Data/HiC/HiC_fused_150_PE/HiCPro_HiC_fused_150_PE/hic_results/data/K5_test_EtOH/K5_test_EtOH.allValidPairs
2020-02-17 12:47:22,627 INFO Input file types: pairs_txt
2020-02-17 12:47:22,627 INFO Final basename: K5_test_EtOH (you can change this with the -n option!)
2020-02-17 12:47:22,627 INFO Creating output folders...
2020-02-17 12:47:24,188 INFO Getting genome regions (fragments or bins)
2020-02-17 12:47:24,188 INFO Getting regions
2020-02-17 12:47:24,189 INFO Two arguments detected, assuming HiC-Pro or 4D Nucleome input.
2020-02-17 12:58:58,664 INFO Done saving read pairs.
Buffers 100% (5151 of 5151) |##############################################| Elapsed Time: 0:00:30 Time: 0:00:30
2020-02-17 13:02:40,806 INFO Updating region mappability
Mappability 100% (16287066 of 16287066) |##################################| Elapsed Time: 0:01:56 Time: 0:01:56
2020-02-17 13:08:34,968 INFO Done adding pairs.
2020-02-17 13:08:35,087 INFO All done.
2020-02-17 13:08:37,261 INFO One argument received, assuming existing Pairs object.
2020-02-17 13:08:37,297 INFO Filtering reads with RE distance > 10000bp
2020-02-17 13:08:37,297 INFO Filtering self-ligated read pairs
2020-02-17 13:08:37,298 INFO Filtering PCR duplicates, threshold <= 2bp
2020-02-17 13:10:14,797 INFO PCR duplicate stats: 2359 (0.0%) of pairs marked as duplicate. (multiplicity:occurances) 2:2330 4:3 3:9
2020-02-17 13:10:14,797 INFO Running filters...
Filter 100% (5151 of 5151) |###############################################| Elapsed Time: 0:06:22 Time: 0:06:22
2020-02-17 13:18:00,651 INFO Total: 16287066. Valid: 16284474
2020-02-17 13:18:00,652 INFO Updating region mappability
Mappability 100% (16284474 of 16284474) |##################################| Elapsed Time: 0:01:58 Time: 0:01:58
2020-02-17 13:25:51,568 INFO Done.
2020-02-17 13:27:17,629 INFO Saving statistics...
2020-02-17 13:27:18,721 INFO All done.
2020-02-17 13:27:20,857 INFO One argument received, assuming existing Pairs object.
Ligation error 100% (16287066 of 16287066) |###############################| Elapsed Time: 0:07:26 Time: 0:07:26
2020-02-17 13:38:52,800 INFO Pairs: 16284474
2020-02-17 13:38:52,800 INFO Inter-chromosomal: 4235251
2020-02-17 13:38:52,800 INFO Same fragment: 162
2020-02-17 13:38:52,801 INFO Same: 5945935
2020-02-17 13:38:52,801 INFO Inward: 3146800
2020-02-17 13:38:52,801 INFO Outward: 2953663
2020-02-17 13:40:23,871 INFO All done.
2020-02-17 13:40:25,917 INFO One argument received, assuming existing Pairs object.
2020-02-17 13:42:01,977 INFO All done.
2020-02-17 13:42:04,495 INFO Converting Pairs files
2020-02-17 13:42:04,531 INFO Converting /media/test/Data/Data/HiC/HiC_fused_150_PE/FANC/pairs/K5_test_EtOH_0.pairs to Hic
Hi-C convert 100% (16284474 of 16284474) |#################################| Elapsed Time: 0:04:40 Time: 0:04:40
2020-02-17 13:51:10,722 INFO Binning Hic file (5000000)
2020-02-17 13:51:10,722 INFO Constructing binned genome...
2020-02-17 13:52:06,402 INFO Binning edges...
2020-02-17 13:52:06,474 INFO Binning Hi-C contacts
2020-02-17 13:53:39,849 INFO Launching processes
2020-02-17 13:54:02,484 INFO Submitting partitions
2020-02-17 13:54:02,522 INFO Collecting results
Binning 100% (378 of 378) |################################################| Elapsed Time: 0:51:35 Time: 0:51:35
Buffers 100% (1 of 1) |####################################################| Elapsed Time: 0:00:00 Time: 0:00:00
Expected 100% (191633 of 191633) |#########################################| Elapsed Time: 0:00:16 Time: 0:00:16
2020-02-17 14:46:21,175 INFO Filtering low-coverage bins using absolute cutoff 0.0, relative cutoff 10.0%
2020-02-17 14:46:32,606 INFO Final absolute cutoff threshold is 3.808e+03
2020-02-17 14:46:32,606 INFO Selected a total of 108 (15.4%) regions to be masked
2020-02-17 14:46:32,606 INFO Running filters...
Filter 100% (1 of 1) |#####################################################| Elapsed Time: 0:00:00 Time: 0:00:00
2020-02-17 14:46:38,116 INFO Total: 191633. Filtered: 15159
Expected 100% (176474 of 176474) |#########################################| Elapsed Time: 0:00:14 Time: 0:00:14
2020-02-17 14:46:53,183 INFO Done.
2020-02-17 14:46:53,806 INFO Saving statistics...
2020-02-17 14:46:54,499 INFO Correcting binned Hic file
Expected 100% (176474 of 176474) |#########################################| Elapsed Time: 0:00:15 Time: 0:00:15
Closing remaining open files:/media/test/Data/Data/HiC/HiC_fused_150_PE/FANC/hic/K5_test_EtOH_0.hic...done
2020-02-17 14:47:22,256 INFO Binning Hic file (2000000)
2020-02-17 14:47:22,257 INFO Constructing binned genome...
2020-02-17 14:48:19,281 INFO Binning edges...
2020-02-17 14:48:19,370 INFO Binning Hi-C contacts
2020-02-17 14:49:53,093 INFO Launching processes
2020-02-17 14:50:17,138 INFO Submitting partitions
2020-02-17 14:50:17,196 INFO Collecting results
Binning 100% (378 of 378) |################################################| Elapsed Time: 0:50:58 Time: 0:50:58
Buffers 100% (3 of 3) |####################################################| Elapsed Time: 0:00:00 Time: 0:00:00
Expected 100% (986224 of 986224) |#########################################| Elapsed Time: 0:01:27 Time: 0:01:27
2020-02-17 15:43:11,404 INFO Filtering low-coverage bins using absolute cutoff 0.0, relative cutoff 10.0%
2020-02-17 15:44:13,072 INFO Final absolute cutoff threshold is 1.66e+03
2020-02-17 15:44:13,072 INFO Selected a total of 185 (11.3%) regions to be masked
2020-02-17 15:44:13,072 INFO Running filters...
Filter 100% (3 of 3) |#####################################################| Elapsed Time: 0:00:15 Time: 0:00:15
2020-02-17 15:44:40,764 INFO Total: 986224. Filtered: 14200
Expected 100% (972024 of 972024) |#########################################| Elapsed Time: 0:01:24 Time: 0:01:24
2020-02-17 15:46:05,397 INFO Done.
2020-02-17 15:46:05,593 INFO Saving statistics...
2020-02-17 15:46:05,765 INFO Correcting binned Hic file
Expected 100% (972024 of 972024) |#########################################| Elapsed Time: 0:01:24 Time: 0:01:24
Closing remaining open files:/media/test/Data/Data/HiC/HiC_fused_150_PE/FANC/hic/K5_test_EtOH_0.hic...done
2020-02-17 15:47:37,969 INFO Binning Hic file (1000000)
2020-02-17 15:47:37,970 INFO Constructing binned genome...
2020-02-17 15:48:33,680 INFO Binning edges...
2020-02-17 15:48:33,801 INFO Binning Hi-C contacts
2020-02-17 15:50:05,273 INFO Launching processes
2020-02-17 15:50:27,625 INFO Submitting partitions
2020-02-17 15:50:27,670 INFO Collecting results
Binning 100% (378 of 378) |################################################| Elapsed Time: 0:52:08 Time: 0:52:08
Buffers 100% (10 of 10) |##################################################| Elapsed Time: 0:00:00 Time: 0:00:00
Expected 100% (2425140 of 2425140) |#######################################| Elapsed Time: 0:03:28 Time: 0:03:28
2020-02-17 16:46:35,777 INFO Filtering low-coverage bins using absolute cutoff 0.0, relative cutoff 10.0%
2020-02-17 16:49:00,944 INFO Final absolute cutoff threshold is 874.6
2020-02-17 16:49:00,945 INFO Selected a total of 336 (10.5%) regions to be masked
2020-02-17 16:49:00,945 INFO Running filters...
Filter 100% (10 of 10) |###################################################| Elapsed Time: 0:00:59 Time: 0:00:59
2020-02-17 16:50:07,847 INFO Total: 2425140. Filtered: 14517
Expected 100% (2410623 of 2410623) |#######################################| Elapsed Time: 0:03:29 Time: 0:03:29
2020-02-17 16:53:37,624 INFO Done.
2020-02-17 16:53:38,317 INFO Saving statistics...
2020-02-17 16:53:38,943 INFO Correcting binned Hic file
Expected 100% (2410623 of 2410623) |#######################################| Elapsed Time: 0:03:28 Time: 0:03:28
Closing remaining open files:/media/test/Data/Data/HiC/HiC_fused_150_PE/FANC/hic/K5_test_EtOH_0.hic...done
2020-02-17 16:57:32,753 INFO Binning Hic file (500000)
2020-02-17 16:57:32,753 INFO Constructing binned genome...
2020-02-17 16:58:29,234 INFO Binning edges...
2020-02-17 16:58:29,408 INFO Binning Hi-C contacts
2020-02-17 17:00:04,295 INFO Launching processes
2020-02-17 17:00:27,033 INFO Submitting partitions
2020-02-17 17:00:27,079 INFO Collecting results
Binning 100% (378 of 378) |################################################| Elapsed Time: 0:51:57 Time: 0:51:57
Buffers 100% (28 of 28) |##################################################| Elapsed Time: 0:00:00 Time: 0:00:00
Expected 100% (3976389 of 3976389) |#######################################| Elapsed Time: 0:05:58 Time: 0:05:58
2020-02-17 17:58:57,881 INFO Filtering low-coverage bins using absolute cutoff 0.0, relative cutoff 10.0%
2020-02-17 18:03:06,696 INFO Final absolute cutoff threshold is 458.7
2020-02-17 18:03:06,698 INFO Selected a total of 638 (10.1%) regions to be masked
2020-02-17 18:03:06,698 INFO Running filters...
Filter 100% (28 of 28) |###################################################| Elapsed Time: 0:01:46 Time: 0:01:46
2020-02-17 18:04:59,231 INFO Total: 3976389. Filtered: 12715
Expected 100% (3963674 of 3963674) |#######################################| Elapsed Time: 0:05:49 Time: 0:05:49
2020-02-17 18:10:49,829 INFO Done.
2020-02-17 18:10:50,826 INFO Saving statistics...
2020-02-17 18:10:51,474 INFO Correcting binned Hic file
Expected 100% (3963674 of 3963674) |#######################################| Elapsed Time: 0:05:48 Time: 0:05:48
Closing remaining open files:/media/test/Data/Data/HiC/HiC_fused_150_PE/FANC/hic/K5_test_EtOH_0.hic...done
2020-02-17 18:17:34,067 INFO Binning Hic file (250000)
2020-02-17 18:17:34,067 INFO Constructing binned genome...
2020-02-17 18:18:31,528 INFO Binning edges...
2020-02-17 18:18:31,827 INFO Binning Hi-C contacts
2020-02-17 18:20:07,307 INFO Launching processes
2020-02-17 18:20:30,635 INFO Submitting partitions
2020-02-17 18:20:30,688 INFO Collecting results
Binning 100% (378 of 378) |################################################| Elapsed Time: 0:51:49 Time: 0:51:49
Buffers 100% (91 of 91) |##################################################| Elapsed Time: 0:00:00 Time: 0:00:00
Expected 100% (5369691 of 5369691) |#######################################| Elapsed Time: 0:07:43 Time: 0:07:43
2020-02-17 19:20:39,438 INFO Filtering low-coverage bins using absolute cutoff 0.0, relative cutoff 10.0%
2020-02-17 19:25:59,514 INFO Final absolute cutoff threshold is 238.3
2020-02-17 19:25:59,517 INFO Selected a total of 1260 (10.0%) regions to be masked
2020-02-17 19:25:59,517 INFO Running filters...
Filter 100% (91 of 91) |###################################################| Elapsed Time: 0:02:23 Time: 0:02:23
2020-02-17 19:28:28,220 INFO Total: 5369691. Filtered: 12179
Expected 100% (5357512 of 5357512) |#######################################| Elapsed Time: 0:07:45 Time: 0:07:45
2020-02-17 19:36:15,424 INFO Done.
2020-02-17 19:36:16,744 INFO Saving statistics...
2020-02-17 19:36:16,908 INFO Correcting binned Hic file
Expected 100% (5357512 of 5357512) |#######################################| Elapsed Time: 0:07:39 Time: 0:07:39
Closing remaining open files:/media/test/Data/Data/HiC/HiC_fused_150_PE/FANC/hic/K5_test_EtOH_0.hic...done
2020-02-17 19:45:36,317 INFO Binning Hic file (100000)
2020-02-17 19:45:36,317 INFO Constructing binned genome...
2020-02-17 19:46:34,006 INFO Binning edges...
2020-02-17 19:46:34,681 INFO Binning Hi-C contacts
2020-02-17 19:48:10,925 INFO Launching processes
2020-02-17 19:48:33,523 INFO Submitting partitions
2020-02-17 19:48:33,584 INFO Collecting results
Binning 100% (378 of 378) |################################################| Elapsed Time: 0:51:51 Time: 0:51:51
Buffers 100% (528 of 528) |################################################| Elapsed Time: 0:00:01 Time: 0:00:01
Expected 100% (7290450 of 7290450) |#######################################| Elapsed Time: 0:10:29 Time: 0:10:29
2020-02-17 20:51:54,939 INFO Filtering low-coverage bins using absolute cutoff 0.0, relative cutoff 10.0%
2020-02-17 20:59:17,808 INFO Final absolute cutoff threshold is 99.1
2020-02-17 20:59:17,815 INFO Selected a total of 3237 (10.3%) regions to be masked
2020-02-17 20:59:17,815 INFO Running filters...
Filter 100% (528 of 528) |#################################################| Elapsed Time: 0:03:28 Time: 0:03:28
2020-02-17 21:02:55,822 INFO Total: 7290450. Filtered: 14365
Expected 100% (7276085 of 7276085) |#######################################| Elapsed Time: 0:10:32 Time: 0:10:32
2020-02-17 21:13:38,361 INFO Done.
2020-02-17 21:13:45,491 INFO Saving statistics...
2020-02-17 21:13:46,176 INFO Correcting binned Hic file
Expected 100% (7276085 of 7276085) |#######################################| Elapsed Time: 0:10:35 Time: 0:10:35
Closing remaining open files:/media/test/Data/Data/HiC/HiC_fused_150_PE/FANC/hic/K5_test_EtOH_0.hic...done
2020-02-17 21:28:10,905 INFO Binning Hic file (50000)
2020-02-17 21:28:10,906 INFO Constructing binned genome...
2020-02-17 21:29:08,432 INFO Binning edges...
2020-02-17 21:29:09,842 INFO Binning Hi-C contacts
2020-02-17 21:30:46,173 INFO Launching processes
2020-02-17 21:31:08,439 INFO Submitting partitions
2020-02-17 21:31:08,509 INFO Collecting results
Binning 100% (378 of 378) |################################################| Elapsed Time: 0:51:33 Time: 0:51:33
Buffers 100% (2016 of 2016) |##############################################| Elapsed Time: 0:00:05 Time: 0:00:05
Expected 100% (8857186 of 8857186) |#######################################| Elapsed Time: 0:13:10 Time: 0:13:10
2020-02-17 22:37:56,847 INFO Filtering low-coverage bins using absolute cutoff 0.0, relative cutoff 10.0%
2020-02-17 22:47:12,192 INFO Final absolute cutoff threshold is 50.8
2020-02-17 22:47:12,203 INFO Selected a total of 6583 (10.5%) regions to be masked
2020-02-17 22:47:12,204 INFO Running filters...
Filter 100% (2016 of 2016) |###############################################| Elapsed Time: 0:04:46 Time: 0:04:46
2020-02-17 22:52:24,767 INFO Total: 8857186. Filtered: 15188
Expected 100% (8841998 of 8841998) |#######################################| Elapsed Time: 0:13:12 Time: 0:13:12
2020-02-17 23:06:14,708 INFO Done.
2020-02-17 23:06:40,789 INFO Saving statistics...
2020-02-17 23:06:41,628 INFO Correcting binned Hic file
Expected 100% (8841998 of 8841998) |#######################################| Elapsed Time: 0:13:14 Time: 0:13:14
Closing remaining open files:/media/test/Data/Data/HiC/HiC_fused_150_PE/FANC/hic/K5_test_EtOH_0.hic...done
2020-02-17 23:26:17,500 INFO Binning Hic file (25000)
2020-02-17 23:26:17,500 INFO Constructing binned genome...
2020-02-17 23:27:15,896 INFO Binning edges...
2020-02-17 23:27:18,290 INFO Binning Hi-C contacts
2020-02-17 23:28:54,112 INFO Launching processes
2020-02-17 23:29:17,246 INFO Submitting partitions
2020-02-17 23:29:17,349 INFO Collecting results
Binning 100% (378 of 378) |################################################| Elapsed Time: 0:51:30 Time: 0:51:30
Buffers 100% (5151 of 5151) |##############################################| Elapsed Time: 0:00:13 Time: 0:00:13
Expected 100% (10724426 of 10724426) |#####################################| Elapsed Time: 0:16:59 Time: 0:16:59
2020-02-18 00:42:16,957 INFO Filtering low-coverage bins using absolute cutoff 0.0, relative cutoff 10.0%
2020-02-18 00:54:26,081 INFO Final absolute cutoff threshold is 25.9
2020-02-18 00:54:26,102 INFO Selected a total of 13370 (10.7%) regions to be masked
2020-02-18 00:54:26,102 INFO Running filters...
Filter 100% (5151 of 5151) |###############################################| Elapsed Time: 0:06:56 Time: 0:06:56
2020-02-18 01:02:27,412 INFO Total: 10724426. Filtered: 14305
Expected 100% (10710121 of 10710121) |#####################################| Elapsed Time: 0:17:06 Time: 0:17:06
2020-02-18 01:21:27,042 INFO Done.
2020-02-18 01:22:35,330 INFO Saving statistics...
2020-02-18 01:22:36,086 INFO Correcting binned Hic file
Expected 100% (10710121 of 10710121) |#####################################| Elapsed Time: 0:16:59 Time: 0:16:59
Closing remaining open files:/media/test/Data/Data/HiC/HiC_fused_150_PE/FANC/hic/K5_test_EtOH_0.hic...done
2020-02-18 01:50:41,601 INFO Binning Hic file (10000)
2020-02-18 01:50:41,601 INFO Constructing binned genome...
2020-02-18 01:51:41,258 INFO Binning edges...
2020-02-18 01:51:47,113 INFO Binning Hi-C contacts
2020-02-18 01:53:26,018 INFO Launching processes
2020-02-18 01:53:48,869 INFO Submitting partitions
2020-02-18 01:53:48,979 INFO Collecting results
Binning 100% (378 of 378) |################################################| Elapsed Time: 0:51:56 Time: 0:51:56
Buffers 100% (5151 of 5151) |##############################################| Elapsed Time: 0:00:15 Time: 0:00:15
Expected 100% (13360813 of 13360813) |#####################################| Elapsed Time: 0:20:38 Time: 0:20:38
2020-02-18 03:11:08,571 INFO Filtering low-coverage bins using absolute cutoff 0.0, relative cutoff 10.0%
2020-02-18 03:25:47,737 INFO Final absolute cutoff threshold is 10.5
2020-02-18 03:25:47,795 INFO Selected a total of 34094 (10.9%) regions to be masked
2020-02-18 03:25:47,795 INFO Running filters...
Filter 100% (5151 of 5151) |###############################################| Elapsed Time: 0:08:07 Time: 0:08:07
2020-02-18 03:35:01,580 INFO Total: 13360813. Filtered: 14492
Expected 100% (13346321 of 13346321) |#####################################| Elapsed Time: 0:20:55 Time: 0:20:55
2020-02-18 04:02:00,309 INFO Done.
2020-02-18 04:03:11,079 INFO Saving statistics...
2020-02-18 04:03:11,884 INFO Correcting binned Hic file
Expected 100% (13346321 of 13346321) |#####################################| Elapsed Time: 0:20:37 Time: 0:20:37
Closing remaining open files:/media/test/Data/Data/HiC/HiC_fused_150_PE/FANC/hic/K5_test_EtOH_0.hic...done
2020-02-18 04:56:18,028 INFO Binning Hic file (5000)
2020-02-18 04:56:18,028 INFO Constructing binned genome...
2020-02-18 04:57:22,887 INFO Binning edges...
2020-02-18 04:57:34,575 INFO Binning Hi-C contacts
2020-02-18 04:59:14,861 INFO Launching processes
2020-02-18 04:59:37,658 INFO Submitting partitions
2020-02-18 04:59:37,777 INFO Collecting results
Binning 100% (378 of 378) |################################################| Elapsed Time: 0:51:51 Time: 0:51:51
Buffers 100% (5151 of 5151) |##############################################| Elapsed Time: 0:00:14 Time: 0:00:14
Expected 100% (14872778 of 14872778) |#####################################| Elapsed Time: 0:23:12 Time: 0:23:12
2020-02-18 06:19:41,858 INFO Filtering low-coverage bins using absolute cutoff 0.0, relative cutoff 10.0%
2020-02-18 06:36:20,225 INFO Final absolute cutoff threshold is 5.3
2020-02-18 06:36:20,333 INFO Selected a total of 69835 (11.1%) regions to be masked
2020-02-18 06:36:20,333 INFO Running filters...
Filter 100% (5151 of 5151) |###############################################| Elapsed Time: 0:08:54 Time: 0:08:54
2020-02-18 06:46:20,943 INFO Total: 14872778. Filtered: 16935
Expected 100% (14855843 of 14855843) |#####################################| Elapsed Time: 0:23:16 Time: 0:23:16
2020-02-18 07:30:26,042 INFO Done.
2020-02-18 07:31:34,277 INFO Saving statistics...
2020-02-18 07:31:35,028 INFO Correcting binned Hic file
Traceback (most recent call last):
File "/usr/local/bin/fanc", line 124, in <module>
Fanc()
File "/usr/local/bin/fanc", line 90, in __init__
command([sys.argv[0]] + sys.argv[option_ix:], log_level=log_level, verbosity=verbosity)
File "/usr/local/lib/python3.6/dist-packages/fanc/commands/fanc_commands.py", line 1497, in hic
intra_chromosomal=not only_interchromosomal)
File "/usr/local/lib/python3.6/dist-packages/fanc/hic.py", line 763, in kr_balancing
m_corrected, bias_vector_chromosome = correct_matrix(m, restore_coverage=restore_coverage)
File "/usr/local/lib/python3.6/dist-packages/fanc/hic.py", line 814, in correct_matrix
m_nonzero = x*m_nonzero*x[:, np.newaxis]
File "/usr/local/lib/python3.6/dist-packages/numpy/ma/core.py", line 4130, in __mul__
return multiply(self, other)
File "/usr/local/lib/python3.6/dist-packages/numpy/ma/core.py", line 1026, in __call__
result = self.f(da, db, *args, **kwargs)
MemoryError: Unable to allocate 16.5 GiB for an array with shape (47125, 47125) and data type float64
Closing remaining open files:/media/test/Data/Data/HiC/HiC_fused_150_PE/FANC/hic/binned/K5_test_EtOH_5kb.hic...done/media/test/Data/Data/HiC/HiC_fused_150_PE/FANC/hic/K5_test_EtOH_0.hic...done
Traceback (most recent call last):
File "/usr/local/bin/fanc", line 124, in <module>
Fanc()
File "/usr/local/bin/fanc", line 90, in __init__
command([sys.argv[0]] + sys.argv[option_ix:], log_level=log_level, verbosity=verbosity)
File "/usr/local/lib/python3.6/dist-packages/fanc/commands/fanc_commands.py", line 114, in auto
return fanc.commands.auto.auto(argv, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/fanc/commands/auto.py", line 1186, in auto
runner.run()
File "/usr/local/lib/python3.6/dist-packages/fanc/commands/auto.py", line 141, in run
"Cancelling execution of all tasks.".format(task.id))
RuntimeError: Task aabf8143-6958-4c0d-9c54-407820d6f987 had non-zero exit status. Cancelling execution of all tasks.
However, it does generate some files - although, not sure if I can use it for further analysis due to the error report
$ tree /media/test/Data/Data/HiC/HiC_fused_150_PE/FANC
/media/test/Data/Data/HiC/HiC_fused_150_PE/FANC
├── fastq
├── hic
│ ├── binned
│ │ ├── K5_test_EtOH_100kb.hic
│ │ ├── K5_test_EtOH_10kb.hic
│ │ ├── K5_test_EtOH_1mb.hic
│ │ ├── K5_test_EtOH_250kb.hic
│ │ ├── K5_test_EtOH_25kb.hic
│ │ ├── K5_test_EtOH_2mb.hic
│ │ ├── K5_test_EtOH_500kb.hic
│ │ ├── K5_test_EtOH_50kb.hic
│ │ ├── K5_test_EtOH_5kb.hic
│ │ └── K5_test_EtOH_5mb.hic
│ └── K5_test_EtOH_0.hic
├── pairs
│ └── K5_test_EtOH_0.pairs
├── plots
│ └── stats
│ ├── K5_test_EtOH_0.pairs.ligation_error.pdf
│ ├── K5_test_EtOH_0.pairs.re_dist.pdf
│ ├── K5_test_EtOH_0.pairs.stats.pdf
│ ├── K5_test_EtOH_100kb.stats.pdf
│ ├── K5_test_EtOH_10kb.stats.pdf
│ ├── K5_test_EtOH_1mb.stats.pdf
│ ├── K5_test_EtOH_250kb.stats.pdf
│ ├── K5_test_EtOH_25kb.stats.pdf
│ ├── K5_test_EtOH_2mb.stats.pdf
│ ├── K5_test_EtOH_500kb.stats.pdf
│ ├── K5_test_EtOH_50kb.stats.pdf
│ ├── K5_test_EtOH_5kb.stats.pdf
│ └── K5_test_EtOH_5mb.stats.pdf
└── sam
7 directories, 25 files
Hi, your system is running our of memory. Knight-Ruiz normalisation (the default) works on full numpy matrices, which are loaded on a per-chromosome basis. You can see that the tool is trying and failing to allocate memory here:
MemoryError: Unable to allocate 16.5 GiB for an array with shape (47125, 47125) and data type float64
You can try ICE normalisation instead, which is slower but much more memory-efficient. There is no need to repeat the whole process, you can start from the Hi-C files. For each of your files, simply do:
fanc hic -i <hic_file>
For example
fanc hic -i K5_test_EtOH_1mb.hic
Actually, from your logs it seems as though all Hi-C files other than the 5kb binned one are fine, so there is no need to renormalise those
Many thanks for your input. Maybe it is related to the fact that is not sequenced deeper enough to analyse at 5 kb.. As I think 500gb RAM memory should not be a limiting factor. Closing here! thanks!
It looks as though the 500Gb are not available to the process running FAN-C, though, so you might want to check system limits. I am successfully running KR matrix normalisation on machines with a lot less memory (32Gb). The memory error is generated by Numpy, which can't allocate 16Gb - so either some other process is using up all the memory or there is some limit on memory available per process.
Hi,
Many thanks for making this toolset available. I'm trying to run fanc compartments on my dataset. If I got it right, I should first convert my Hi-C analysis output into fanc input using fanc auto. Once I do this first step, using .validpairs as fanc auto, I get this error:
I'm using Linux, any idea what is going on?
thank you for your time,