R/getChromSize.R

Defines functions .getDimensions getChromSize

Documented in getChromSize

getChromSize <- function( tallyFile, group, dataset = "Reference", posDim = 1 ){
  .getDimensions( tallyFile, group, dataset )[posDim]
}

.getDimensions <- function( tallyFile, group, dataset ){
  f <- H5Fopen(tallyFile, flags = "H5F_ACC_RDONLY")
  g <- H5Gopen(f, group)
  d <- H5Dopen(g, dataset)
  s <- H5Dget_space(d)
  ret <- H5Sget_simple_extent_dims(s)$size
  H5Sclose(s)
  H5Dclose(d)
  H5Gclose(g)
  H5Fclose(f)
  return(ret)
}

Try the h5vc package in your browser

Any scripts or data that you put into this service are public.

h5vc documentation built on Nov. 8, 2020, 4:56 p.m.