Load module¶
-
fanc.tools.load.
load
(file_name, *args, **kwargs)¶ Load a file into your current Python session.
load()
is a magic function that replaces the need for importing files using different classes or functions. It “just works” for all objects generated by FAN-C (Hic
,ReadPairs
,ABCompartmentMatrix
, …), for compatible Hi-C files from Cooler or Juicer, and most of the major file formats for genomic regions (BED, GFF, BigWig, Tabix, …).Simply run
o = fanc.load("/path/to/file")
Depending on the file type, the returned object can be the instance of one (or more) of these classes:
RegionBased
for genomic region formats (BED, GFF, …, but also most FAN-C objects)RegionMatrixContainer
orRegionPairsContainer
for read pair or matrix-based FAN-C objects, as well as Cooler and Juicer filesAlignmentFile
for SAM/BAM files
- Parameters
file_name – Path to file
args – Positional arguments passed to the class/function that can load the file
kwargs – Keyword arguments passed to the class/function that can load the file
- Returns
object (
RegionBased
,RegionMatrixContainer
,RegionPairsContainer
, orAlignmentFile
)