convertInputData {chromDraw} | R Documentation |
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.
convertInputData(karyotypes)
karyotypes |
vector of the Genomic Ranges structures per karyotype. |
return exit state.
#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);