Hello, I am trying to run the GRanges package after reading in a .csv file in Rstudio, I believe it is looking at methylation positions across chromosomes. The code was provided to me and is as follows:
islandHMM <- read.csv(paste0("C:/Users/Tristanv/Documents/RStudio/model-based-cpg-islands-hg19-chr17.txt"), header=FALSE, sep="\t", stringsAsFactors=FALSE) islandData <- GRanges(seqnames=Rle(islandHMM[,1]), ranges=IRanges(start=islandHMM[,2], end=islandHMM[,3]), strand=Rle(strand(rep("*",nrow(islandHMM)))))
The csv file reads correctly and looks like the attached (first six rows shown).
The second part of the code concerning GRanges gives an error:
Error in .normargSEW0(start, "start") : 'start' must be a numeric vector (or NULL)
I am not sure how I would go about fixing this, I am fairly new to R. Thanks in advance for and help.