export_gmql: Create GMQL dataset from GRangesList

Description Usage Arguments Details Value See Also Examples

View source: R/GRangesToGMQL.R

Description

It creates GMQL dataset from GRangesList. All samples are in GDM (tab-separated values) or GTF file format

Usage

1
export_gmql(samples, dir_out, is_gtf)

Arguments

samples

GRangesList

dir_out

folder path where to create a folder and write the sample files

is_gtf

logical value indicating if samples have to be exported with GTF or GDM format

Details

The GMQL dataset is made up by two different file types:

Sample region files and metadata files are associated through file name: for example S_0001.gdm for region file and S_0001.gdm.meta for its metadata file

Value

None

See Also

import_gmql

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Load and attach add-on GenomicRanges package
library(GenomicRanges)

## These statemens create two GRanges with the region attributes: seqnames, 
## ranges (region coordinates) and strand, plus two column elements:  
## score and GC

gr1 <- GRanges(seqnames = "chr2", ranges = IRanges(3, 6), strand = "+", 
    score = 5L, GC = 0.45)
gr2 <- GRanges(seqnames = c("chr1", "chr1"),
    ranges = IRanges(c(7,13), width = 3), strand = c("+", "-"), 
    score = 3:4, GC = c(0.3, 0.5))

## This statement creates a GRangesList using the previous GRanges 

grl = GRangesList(gr1, gr2)

## This statement defines the path to the subdirectory "example" of the 
## package "RGMQL" and exports the GRangesList as GMQL datasets with sample 
## files in GTF file format, using the last name of 'dir_out' path as 
## dataset name

test_out_path <- system.file("example", package = "RGMQL")
export_gmql(grl, test_out_path, TRUE)

RGMQL documentation built on Nov. 8, 2020, 5:59 p.m.