read_motifmap: Read MotifMap-provided BED file into a GRanges object.

View source: R/file_format_io.R

read_motifmapR Documentation

Read MotifMap-provided BED file into a GRanges object.

Description

Even though this function reads a BED file, rtracklayer::import.bed() is not suitable because it chokes on spaces in fields, which MotifMap contains. Hence the need for a separate function.

Usage

read_motifmap(file, parse_name = TRUE)

Arguments

file

The file name to read from.

parse_name

If TRUE, separate the "name" column into "motif_ID" and "TF_name" fields.

Value

a GRanges object with an mcol named "score". If parse_name is FALSE, it will also have an mcol named "name". If parse_name is TRUE, it will have mcols named "motif_ID", and "TF_name".


DarwinAwardWinner/rctutils documentation built on July 22, 2022, 5:19 a.m.