export_gmql {RGMQL} | R Documentation

## Create GMQL dataset from GRangesList

### Description

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

### Usage

    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:

- metadata files: they contain metadata associated with corrisponding sample.

- region files: they contain genomic regions data.

- region schema file: XML file that contains region attribute names (e.g. chr, start, end, pvalue)

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

    ## 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)

[Package RGMQL version 1.10.0 Index]