Creates a track from WIG / BigWig / BedGraph / tab-delimited file

gtrack.import(
  track = NULL,
  description = NULL,
  file = NULL,
  binsize = NULL,
  defval = NaN
)

Arguments

track

track name

description

a character string description

file

file path

binsize

bin size of the newly created 'Dense' track or '0' for a 'Sparse' track

defval

default track value

Value

None.

Details

This function creates a track from WIG / BigWig / BedGraph / tab-delimited file. One can learn about the format of the tab-delimited file by running 'gextract' function on a 1D track with a 'file' parameter set to the name of the file. Zipped files are supported (file name must have '.gz' or '.zip' suffix).

If 'binsize' is 0 the resulted track is created in 'Sparse' format. Otherwise the 'Dense' format is chosen with a bin size equal to 'binsize'. The values that were not defined in input file file are substituted by 'defval' value.

'description' is added as a track attribute.