convertInputData {chromDraw} | R Documentation

## The R function for converting Genomic Ranges data structure to the chromDraw dat format.

### Description

The R function for converting Genomic Ranges data structure to the chromDraw dat format. Output of this function is file "data.txt" in the working directory.

### Usage

    convertInputData(karyotypes)

### Arguments

`karyotypes` | vector of the Genomic Ranges structures per karyotype.

### Value

return exit state.

### Examples

    #load package
    library(GenomicRanges)

    #data generating
    karyotype1 <- GRanges(seqnames =Rle(c("Ack1", "Ack2"), c(5, 5)),ranges =
    IRanges(start = c(0, 400000,0,3300000,6000000,0,2500000,0,3800000,6400000),
            end = c(400000,3300000,0,6000000,10400000,2500000,3800000,0,6400000,14800000),
            names = c("A","B","CENTROMERE","C","D","E","F","CENTROMERE","G","H")),
            color = c("orange","yellow","","orange","red","green","green","","red","orange"));

    karyotype2 <- GRanges(seqnames =Rle(c("Ack3", "Ack4"), c(4, 4)),ranges =
    IRanges(start = c(0,0, 2400000,3500000,0,0,2400000,6700000),
            end = c(2400000,0,3500000,12200000,2400000,0,6700000,9200000),
            names = c("I","CENTROMERE","J","K","L","CENTROMERE","M","N")),
            color = c("light_blue","","orange","red","pink","","red","light_blue"));

    inputData <- list(karyotype1,karyotype2);

    #run the function for generate chromDraw data file.
    convertInputData(inputData);

[Package chromDraw version 2.22.0 Index]