gi_list_write: gi_list_write

View source: R/gi_list_write.R

gi_list_writeR Documentation

gi_list_write

Description

Writes a valid gi_list instance into a file.

Usage

gi_list_write(
  gi_list,
  fname,
  chrs = NULL,
  columns = "minimal",
  rows = "all",
  significance_threshold = 0.05,
  score = NULL
)

Arguments

gi_list

List of GenomicInteractions objects where each object named with chromosomes contains intra-chromosomal interaction information (see ?gi_list_validate for a detailed explanation of valid gi_list instances).

fname

path to the file to write to (can end with .txt, or .txt.gz).

chrs

select a subset of chromosomes' e.g., c('chr21','chr22'). Defaults to all chromosomes in the gi_list.

columns

Can be 'minimal', which is just distance and counts (and HiCDCPlus result columns 'qvalue','pvalue','mu',and 'sdev', if exists; see ?HiCDCPlus) information, 'minimal_plus_features', which is distance, counts, and other calculated 2D features, 'minimal_plus_score', which generates a .hic pre compatible text file, or 'all', which is distance, counts, calculated 2D features, as well as all 1D features. Defaults to 'minimal'.

rows

Can be 'all' or 'significant', which filters rows according to FDR adjusted pvalue column 'qvalue' (this has to exist in mcols(.)) at significance_threshold. Defaults to 'all'.

significance_threshold

Row filtering threshold on 'qvalue'. Defaults to 0.05.

score

Score column to extract to .hic pre compatible file. See mode options in ?hicdc2hic for more details.

Value

a tab separated flat file concatenating all intra-chromosomal interaction information.

Examples

outputdir<-paste0(tempdir(check=TRUE),'/')
gi_list<-generate_binned_gi_list(1e6,chrs='chr22')
gi_list_write(gi_list,paste0(outputdir,'test.txt'))

mervesa/HiCDCPlus documentation built on June 8, 2022, 3:43 a.m.