I try to reproduce (part of) the code in the vignette.
library(HiCDCPlus)
outdir<-tempdir(check=TRUE)
construct_features(output_path=paste0(outdir,"/hg38_50kb_GATC"),
gen="Hsapiens",gen_ver="hg38",
sig="GATC",bin_type="Bins-uniform",
binsize=50000,
chrs=c("chr22"))
hicfile_paths<-c(
system.file("extdata", "GSE131651_NSD2_LOW_arima_example.hic", package = "HiCDCPlus"),
system.file("extdata", "GSE131651_NSD2_HIGH_arima_example.hic", package = "HiCDCPlus"),
system.file("extdata", "GSE131651_TKOCTCF_new_example.hic", package = "HiCDCPlus"),
system.file("extdata", "GSE131651_NTKOCTCF_new_example.hic", package = "HiCDCPlus"))
for(hicfile_path in hicfile_paths){
output_path<-paste0(outdir,'/',
gsub("^(.*[\\/])", "",gsub('.hic','.txt.gz',hicfile_path)))
#generate gi_list instance
gi_list<-generate_bintolen_gi_list(
bintolen_path=paste0(outdir,"/hg38_50kb_GATC_bintolen.txt.gz"),
gen="Hsapiens",gen_ver="hg38")
gi_list<-add_hic_counts(gi_list,hic_path = hicfile_path)
#expand features for modeling
gi_list<-expand_1D_features(gi_list)
#run HiC-DC+ on 2 cores
set.seed(1010) #HiC-DC downsamples rows for modeling
gi_list<-HiCDCPlus(gi_list,ssize=0.1)
#write results to a text file
gi_list_write(gi_list,fname=output_path)
}
I have the following error (translated from French):
Error : R_Reprotect : only 1 element protected, impossible to reprotect index -4
The numbers mentioned (here 1 and -4) vary. Each time I run the code, the numbers change.
Oddly enough, using only one (whichever one) of the file does not trigger an error.
I then run the code with:
R -d valgrind -f test.R
I get:
==3827811== Conditional jump or move depends on uninitialised value(s)
==3827811== at 0x483F658: memset (vg_replace_strmem.c:1251)
==3827811== by 0xD31912F: memset (string_fortified.h:71)
==3827811== by 0xD31912F: select_hits (Hits_class.c:324)
==3827811== by 0x4945013: ??? (in /usr/lib/R/lib/libR.so)
==3827811== by 0x49455C4: ??? (in /usr/lib/R/lib/libR.so)
==3827811== by 0x498DFE1: ??? (in /usr/lib/R/lib/libR.so)
==3827811== by 0x499C98F: Rf_eval (in /usr/lib/R/lib/libR.so)
==3827811== by 0x499E62D: ??? (in /usr/lib/R/lib/libR.so)
==3827811== by 0x499F44C: Rf_applyClosure (in /usr/lib/R/lib/libR.so)
==3827811== by 0x498C5FF: ??? (in /usr/lib/R/lib/libR.so)
==3827811== by 0x499C98F: Rf_eval (in /usr/lib/R/lib/libR.so)
==3827811== by 0x499E62D: ??? (in /usr/lib/R/lib/libR.so)
==3827811== by 0x499F44C: Rf_applyClosure (in /usr/lib/R/lib/libR.so)
The error is triggered by gi_list_write.
I would be most grateful if you had the time to have a look.
The root cause could be the same as that of #1 . Could you please try upgrading your data.table to 1.13.7 and setting setDTthreads(threads = 1) at the header of your script?
Dear authors,
I try to reproduce (part of) the code in the vignette.
I have the following error (translated from French):
The numbers mentioned (here 1 and -4) vary. Each time I run the code, the numbers change.
Oddly enough, using only one (whichever one) of the file does not trigger an error.
I then run the code with:
I get:
The error is triggered by
gi_list_write
.I would be most grateful if you had the time to have a look.
Thanks!
Session info: