issue in chromosome name
Closed this issue · 1 comments
juancresc commented
I've tried the following with this karyotype file:
devtools::install_github('TickingClock1992/RIdeogram')
require(RIdeogram)
setwd('/home/juan/Desktop/juan/bio/svevo-zavitan')
data(human_karyotype, package="RIdeogram")
data(gene_density, package="RIdeogram")
human_karyotype
gene_density
karyo = read.csv(file="data/karyotype.csv", header=TRUE, sep=",")
density = read.csv(file="data/snp_dens.csv", header=TRUE, sep=",")
ideogram(karyotype = karyo, overlaid = density)
convertSVG("chromosome.svg", device = "png")
Chr,Start,End,CE_start,CE_end
chr1A,0,585266722,0,0
chr1B,0,681112512,0,0
chr2A,0,775448786,0,0
chr2B,0,790338525,0,0
chr3A,0,746673839,0,0
chr3B,0,836514780,0,0
chr4A,0,736872137,0,0
chr4B,0,676292951,0,0
chr5A,0,669155517,0,0
chr5B,0,701372996,0,0
chr6A,0,615672275,0,0
chr6B,0,698614761,0,0
chr7A,0,728031845,0,0
chr7B,0,722970987,0,0
chrUn,0,498719471,0,0
and got the following error:
ideogram(karyotype = karyo, overlaid = density)
Error in nchar(karyotype$Chr) : 'nchar()' requires a character vector
So I have to modify my karyotype as follow:
Chr,Start,End,CE_start,CE_end
1,0,585266722,0,0
2,0,681112512,0,0
3,0,775448786,0,0
4,0,790338525,0,0
5,0,746673839,0,0
6,0,836514780,0,0
7,0,736872137,0,0
8,0,676292951,0,0
9,0,669155517,0,0
10,0,701372996,0,0
11,0,615672275,0,0
12,0,698614761,0,0
13,0,728031845,0,0
14,0,722970987,0,0
15,0,498719471,0,0
Would be nice to support the other format
TickingClock1992 commented
Hi, there is no problem using the format like "chr1A" in my case. Maybe, the format of your input file is not right, try again or send me all the input files and codes (haozd1992@163.com).