makeGenomicInteractionsFromFile: Function to create GenomicInteraction objects from a file

View source: R/import.R

makeGenomicInteractionsFromFileR Documentation

Function to create GenomicInteraction objects from a file

Description

Function to create GenomicInteraction objects from a variety of files. The resulting objects contain information on which genomic regions are interacting with each other, and the number of counts supporting each interaction. It is also possible to store information on associated p-values and false-discovery rates (FDR). It is possible to create GenomicInteractions objects for various datasets including Hi-C and ChIA-PET. It is possible to read interactions from a variety of files including BAM files, bed files (BED12 and BEDPE) and from the output from standard processing pipelines, such as HOMER and ChIA-PET tool. GenomicInteractions objects can also be created using calls of the form new('GenomicInteractions', ...). For hiclib, it expects the directory in which the files extracted using h5dictToTxt.py from the hdf5 file are located, where as for all of the other file types it expects the full filename. Note that recent versions of hiclib (2015-) cannot export the required data and so this function will only work with older files. Hiclib support will be removed in the next version of GenomicInteractions.

Usage

makeGenomicInteractionsFromFile(
  fn,
  type,
  experiment_name = "",
  description = "",
  chr_names = NULL
)

Arguments

fn

Filename or, if type='hiclib', folder

type

One of 'chiapet.tool', 'bed12', 'bedpe', 'hiclib', 'homer', 'bam', 'two.bams'.

experiment_name

Experiment name.

description

Description of experiment.

chr_names

a vector of chromosome names in order, required for re-naming chromosomes for hiclib import

Value

a GenomicInteractions object

Examples


k562.rep1 <- makeGenomicInteractionsFromFile(
       system.file(package='GenomicInteractions', 'extdata', 'k562.rep1.cluster.pet3+.txt'),
       type='chiapet.tool', experiment_name='k562', description='k562 pol2 8wg16')

k562.rep1


ComputationalRegulatoryGenomicsICL/GenomicInteractions documentation built on April 16, 2022, 4:09 a.m.