Description Usage Arguments Details Value See Also Examples
View source: R/GRangesToGMQL.R
It creates GMQL dataset from GRangesList. All samples are in GDM (tab-separated values) or GTF file format
1 | export_gmql(samples, dir_out, is_gtf)
|
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 |
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
None
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.