extractfeature: Extract features for certain genomic regions

View source: R/extractfeature.R

extractfeatureR Documentation

Extract features for certain genomic regions

Description

Extract features for certain genomic regions

Usage

extractfeature(res, region, mode = "overlap", folder = NULL)

Arguments

res

Matrix outputted by SCATE.

region

Dataframe of genomic region. First column: chromosome name. Second column: start position. Third column: end position.

mode

Either 'overlap' or 'nearest'. If overlap, only bins that overlap with the regions of interest will be shown. If nearest, the nearest bin to each region will be shown. Order will be the same as the input genomic region.

folder

A character value specifying the location where the BED files will be stored. If not NULL, the signal and location of each bin will be saved as BED files in 'folder'. Each cluster has its own BED file, and the name of the BED file is the same as the cluster name. These BED files can be uploaded to UCSC genome browser for visualization.

Details

This function takes as input the recontructed matrix generated by SCATE and a list of genomic regions of interest by the user. It outputs a subset of matrix that overlaps or nearest to the given genomic regions of interest.

Value

If foler is NULL, a subset of the input matrix. Otherwise nothing will be returned and the results will be saved to local folder.

Author(s)

Zhicheng Ji, Weiqiang Zhou, Wenpin Hou, Hongkai Ji* <whou10@jhu.edu>

Examples

scateres <- data.frame(combine=seq_len(6))
rownames(scateres) <- paste0('chr1_',c(0:5)*200,'_',199+c(0:5)*200)
extractfeature(scateres,data.frame(seqnames='chr1',start=0,end=201))

Winnie09/SCATE documentation built on May 10, 2023, 8:10 a.m.