Package 'chromDraw'

Title: chromDraw is a R package for drawing the schemes of karyotypes in the linear and circular fashion.
Description: ChromDraw is a R package for drawing the schemes of karyotype(s) in the linear and circular fashion. It is possible to visualized cytogenetic marsk on the chromosomes. This tool has own input data format. Input data can be imported from the GenomicRanges data structure. This package can visualized the data in the BED file format. Here is requirement on to the first nine fields of the BED format. Output files format are *.eps and *.svg.
Authors: Jan Janecka, Ing., Mgr. CEITEC Masaryk University
Maintainer: Jan Janecka <[email protected]>
License: GPL-3
Version: 2.35.0
Built: 2024-09-28 04:12:01 UTC
Source: https://github.com/bioc/chromDraw

Help Index


chromDraw - simple karyotype visualization tool.

Description

ChromDraw is a R package for drawing the schemes of karyotype(s) in the linear and circular fashion. It is possible to visualized cytogenetic marsk on the chromosomes. This tool has own input data format. Input data can be imported from the GenomicRanges data structure. This package can visualized the data in the BED file format. Here is requirement on to the first nine fields of the BED format. Output files format are *.eps and *.svg.

Details

Package: chromDraw
Type: Package
Date: 2015-12-12
License: GPL-3
License: LGPL | library Board

This package has only one function with two parameters, such as main function in C. First parameter ARGC is a count of input parameters and second parameter ARGV is vector contain calling parameters. Example: chromDraw(argc=5, argv=c("chromDraw", "-c", "/home/user/Documents/colors.txt", "-d", "/home/user/Documents/input_data.txt"))

First string in vector with arguments must be package name. The others strings in vector are parameter string and string with parameter value. As shown in the example.

Author(s)

Jan Janecka, Ing. Mgr. CEITEC MU Masaryk University Kamenice 5, Building A26 CZ-625 00, Brno Czech Republic tel.: 549 49 8190

Email: [email protected]

References

LibBoard: A vector graphics C++ library (Version 0.9.0). GREYC laboratory. [Software]. http://libboard.sourceforge.net/. [accessed Sept. 2014].

See Also

chromDraw main_chromDraw

Examples

OUTPUTPATH = file.path(getwd());
INPUTPATH = system.file('extdata','Ack_and_Stenopetalum_nutans.txt', package ='chromDraw')
COLORPATH = system.file('extdata','default_colors.txt', package ='chromDraw')
chromDraw(argc=7, argv=c("chromDraw", "-c", COLORPATH, "-d", INPUTPATH, "-o", OUTPUTPATH));

Main chromDraw function. This R function calls the main C++ function.

Description

Main chromDraw function. This R function calls the main C++ function.

Usage

chromDraw(argc, argv)

Arguments

argc

count of the input parameters.

argv

vector with the input parameters strings.

Value

return exit state.

Examples

OUTPUTPATH = file.path(getwd());
INPUTPATH = system.file('extdata','Ack_and_Stenopetalum_nutans.txt', package ='chromDraw')
COLORPATH = system.file('extdata','default_colors.txt', package ='chromDraw')
chromDraw(argc=7, argv=c("chromDraw", "-c", COLORPATH, "-d", INPUTPATH, "-o", 
OUTPUTPATH));

Function chromDrawGR uses Genomic Ranges as input data format. This R function call the main C++ function.

Description

Function chromDrawGR uses Genomic Ranges as input data format. This R function call the main C++ function. If the output directory is not set, then it is use working directory for the outputs.

Usage

chromDrawGR(karyotypes, colors)

Arguments

karyotypes

vector of the Genomic Ranges structures per karyotype.

colors

data frame definition of coloros, containing color name and RGB of the color values.

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

#colors generating
name <- c("yellow", "red", "blue", "violet", "orange", "green", "light_blue", "pink");
r <- c(255, 255, 0, 255, 247, 0, 0, 230);
g <- c(255, 0, 0, 0 ,148, 255, 255, 170);
b <- c(0, 0, 255, 255, 29, 0, 255, 160);
inputColors <- data.frame(name,r,g,b);

#run the function with generated data and colors
chromDrawGR(inputData,inputColors);

The R function for converting the data frame with colors to chromDraw color data format.

Description

The R function for converting the data frame with colors to chromDraw color data format. Output of this function is file "colors.txt" in the working directory.

Usage

convertInputColors(colors);

Arguments

colors

data frame definition of coloros, containing color name and RGB of color values.

Value

return file with colors in working directory.

Examples

#colors generating
name <- c("yellow", "red", "blue", "violet", "orange", "green", "light_blue", "pink");
r <- c(255, 255, 0, 255, 247, 0, 0, 230);
g <- c(255, 0, 0, 0 ,148, 255, 255, 170);
b <- c(0, 0, 255, 255, 29, 0, 255, 160);
inputColors <- data.frame(name,r,g,b);

#run the function for generate chromDraw color file.
convertInputColors(inputColors);

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

The main chromDraw function, that controls all other C++ functions.

Description

The main chromDraw function, that controls all other C++ functions.

Usage

main_chromDraw(argc, argv)

Arguments

argc

Count of the input parameters.

argv

Vector with the input parameters strings.

Value

Return exit state.

Examples

OUTPUTPATH = file.path(getwd());
INPUTPATH = system.file('extdata','Ack_and_Stenopetalum_nutans.txt', package ='chromDraw')
COLORPATH = system.file('extdata','default_colors.txt', package ='chromDraw')
chromDraw(argc=7, argv=c("chromDraw", "-c", COLORPATH, "-d", INPUTPATH, "-o", 
OUTPUTPATH));