TickingClock1992 / RIdeogram

154 stars 23 forks source link

How to use Negative values as gene density values when using RIdeogram? #40

Open Fawn1609 opened 9 months ago

Fawn1609 commented 9 months ago

Hi, I'm trying to use DEG data for an ideogram plot, but it seems the gene_density should be between 1 and 10000 (cnum <- 10000 in the origin code). Negative values were not counted? Any suggestions will be greatly appreciated!

Script:

mouse_karyotype <- read.table("mouse_karyotype.txt", sep = "\t", header = T, stringsAsFactors = F) gene_density <- read.table("DensityA.txt", sep = "\t", header = T, stringsAsFactors = F) str(gene_density) 'data.frame': 422 obs. of 4 variables: $ Chr : chr "10" "17" "19" "5" ... $ Start: int 80805018 50279393 46667165 67607883 25466709 98842356 98354245 133350674 85684267 152576086 ... $ End : int 80807648 50293620 46673000 67613987 25470113 98859789 98356705 133360320 85688254 152580312 ... $ value: num 7.75 6.54 8.25 -5.57 6.71 ... ideogram(karyotype = mouse_karyotype) ideogram(karyotype = mouse_karyotype, overlaid = gene_density) Error in round(rescale(mydata$Value, to = c(1, cnum))) : non-numeric argument to mathematical function