You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overview
There is currently an issue or misunderstanding having to do with importing and visualizing HiC Pro data exported by HiCPro2DNAlandscapeR .
sparseHiC::HiCPro2DNAlandscapeR
The HiCPro2DNAlandscapeR function converts HiC Pro data into an RDS file and then outputs that RDS file and a metadata file inside a .tgz.
DNAlandscapeR Import
On the import tab of DNAlandscapeR, in the 'Data type' drop-down, HiC data is referenced as 'Hi-C/.tgz', giving the impression that the user should select a .tgz file for import, such as the one output by HiCPro2DNAlandscapeR.
However, if you import the .tgz file and try to visualize it readRDS inside DNAlandscapeR throws the following error:
# Hi C data
} else { #datType is 6
old <- curfile
+ if (tolower(tools::file_ext(old)) == 'tgz')+ {+ # Extract the files and pull the list into var+ # At the same time push entire file name tolower for grep+ comp_files = tolower(untar(old, list=TRUE))+ # Get the path to the RDS file we just pulled out of tgz+ rds_path = grep("rds", comp_files, value = T)+ curfile <- rds_path+ else + {
curfile <- paste0(curfile, name, ".rds")
file.rename(old, curfile)
+ }
Notes
I'm not aware of the possible downstream or unintended consequences of either possible fix as I only tested the HiC visualization functionality after implementing the code change described in fix 2.
My code in fix 2 includes the use of the tools library. This additional dependency should have little effect as it is included in the R base and I call it without the need for importing it, tools::file_ext().
The text was updated successfully, but these errors were encountered:
Overview
There is currently an issue or misunderstanding having to do with importing and visualizing HiC Pro data exported by HiCPro2DNAlandscapeR .
sparseHiC::HiCPro2DNAlandscapeR
The HiCPro2DNAlandscapeR function converts HiC Pro data into an RDS file and then outputs that RDS file and a metadata file inside a .tgz.
DNAlandscapeR Import
On the import tab of DNAlandscapeR, in the 'Data type' drop-down, HiC data is referenced as 'Hi-C/.tgz', giving the impression that the user should select a .tgz file for import, such as the one output by HiCPro2DNAlandscapeR.
However, if you import the .tgz file and try to visualize it readRDS inside DNAlandscapeR throws the following error:
(message = "unknown input format", call = readRDS(file)
This appears to be due to DNAlandscapeR handing the .tgz file directly to readRDS without first extracting the contained .rds file.
Possible Fixes
The 'Data type' field for HiC could be changed to 'Hi-C/.rds' so that users know to select the .rds file for importing and not the .tgz file.
Code could be inserted into server.R that handles unzipping the .tgz file and giving DNAlandscapeR the path to the .rds file that is inside.
Such as the following change to server.R starting at line 560.
Notes
I'm not aware of the possible downstream or unintended consequences of either possible fix as I only tested the HiC visualization functionality after implementing the code change described in fix 2.
My code in fix 2 includes the use of the tools library. This additional dependency should have little effect as it is included in the R base and I call it without the need for importing it, tools::file_ext().
The text was updated successfully, but these errors were encountered: