YuLab-SMU / ChIPseeker

:dart: ChIP peak Annotation, Comparison and Visualization
https://onlinelibrary.wiley.com/share/author/GYJGUBYCTRMYJFN2JFZZ?target=10.1002/cpz1.585
219 stars 74 forks source link

Would be good to add an error message if the peakfile is not bed file #232

Open pocession opened 6 months ago

pocession commented 6 months ago

If the input file is a bed format, then column names should be removed. But if the user forgets to remove the column names, then the following error is generated:

Error in peak.df[, 2] + 1 : non-numeric argument to binary operator

It would be easier to understand if some error message is put in isBedFile() to remind user not include column name when the input file is bed format.

e.g.

if (!is.numeric(df[1,2])) {
message("It seems you include the column name in the bed file. Could you remove it?")
}