SFUStatgen / LDheatmap

14 stars 8 forks source link

Error plotting genes #1

Closed GabrielHoffman closed 5 years ago

GabrielHoffman commented 5 years ago

I get an error when I run:

library(LDheatmap)
library(GenomicRanges)
query = GRanges("chr20", IRanges(61565666, 62643839))
plotGenes(start(query), end(query), seqnames(query),
        genome="hg38", plot_lines_distance = 0.04, splice_variants=TRUE, non_coding=TRUE)

I get the error:

Error in rgb(r, g, b, maxColorValue = 225) :
  color intensity 1.13333, not in [0,1] 

I think I found the source of the error: line 251 of plotGenes.R: gene_color <- rgb(r,g,b, maxColorValue = 225) should be gene_color <- rgb(r,g,b, maxColorValue = 255)

mcneney commented 5 years ago

Dear Gabriel,

Thanks very much for your bug report and detailed fix, which we'll apply ASAP.

Brad


From: Gabriel Hoffman notifications@github.com Sent: February 20, 2019 11:35 AM To: SFUStatgen/LDheatmap Cc: Subscribed Subject: [SFUStatgen/LDheatmap] Error plotting genes (#1)

I get an error when I run:

library(LDheatmap) library(GenomicRanges) query = GRanges("chr20", IRanges(61565666, 62643839)) plotGenes(start(query), end(query), seqnames(query), genome="hg38", plot_lines_distance = 0.04, splice_variants=TRUE, non_coding=TRUE)

I get the error:

Error in rgb(r, g, b, maxColorValue = 225) : color intensity 1.13333, not in [0,1]

I think I found the source of the error: line 251 of plotGenes.R: gene_color <- rgb(r,g,b, maxColorValue = 225) should be gene_color <- rgb(r,g,b, maxColorValue = 255)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/SFUStatgen/LDheatmap/issues/1, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGBr0wphBYGVCkE9k6VAOfqAvaBzpOBdks5vPaOGgaJpZM4bF9YW.