rGREAT
rGREAT copied to clipboard
input conversion error in submitGreatJob
Came across an edge case with submitGreatJob
Running:
target_gr <- GenomicRanges::GRanges(
seqnames = "chr20",
ranges = IRanges::IRanges(start = 8000001, end = 8000168)
)
job <- rGREAT::submitGreatJob(target_gr, species = "hg19")
produces the following error:
Error in rGREAT::submitGreatJob(target_gr, species = "hg19") :
GREAT encountered a user error (message from GREAT web server):
Line 1: The second field (chromStart) must be a non-negative integer (not 8e+06). Input data: 'chr20
8e+06 8000168 /chr20:8e+06-8000168'
8000001 is being rewritten into scientific notation (8e+06) and being converted into a string at some point within the function. After a bit of testing, changing 8000001 to 8000002 fixes the error, so it seems like a very narrow case of R rounding numeric notation.