jianhong / ChIPpeakAnno

11 stars 4 forks source link

toGRanges() can't read in file name #17

Closed hukai916 closed 2 years ago

hukai916 commented 2 years ago

Hi Jianhong,

This is related to the issue posted at https://support.bioconductor.org/p/9141976/#9142000.

I tested with the following commands:

bed <- "overlap_flag_coordinates_with_r_duplicates_removed.bed"
bed_df <- read.table(bed, header = FALSE, sep="\t",stringsAsFactors=FALSE, quote="")

#1: 
toGRanges(bed, format="BED")
# Error: each range must have an end that is greater or equal to its start minus one

#2:
toGRanges(bed_df)
# Error: Error in (function (data, colNames = NULL, format = "", ...)  : 
  colname must contain space/seqnames, start and end.
# I manually checked, the (ends - starts) are strictly larger than 1.

#3:
toGRanges(bed, format="narrowPeak")
# this works

ChIPpeakAnno_3.26.4

The above suggests that toGRanges() might have some glitch with dealing with "BED" format.
jianhong commented 2 years ago

This error will be handled.