Question: MethylKit read in issue
gravatar for bekah
6 days ago by
bekah0 wrote:

I am having trouble with methylkit read in - I have the methylcall output context files from bismark which I am trying to read into MethylKit. However I am getting the same error after trying to read in as a raw methyl object 

Error in fread(filepath, ...) : 
  Input is either empty or fully whitespace after the skip or autostart. Run again with verbose=TRUE.

file.list=list( system.file("extdata", 
                            "CpG_90.txt", package = "methylKit"),
                            "CpG_91.txt", package = "methylKit"),
                            "CpG_95.txt", package = "methylKit"),
                            "CpG_96.txt", package = "methylKit") )

# read the files to a methylRawList object: myobj

I tried adding in the verbose, but it just said it was an unused argument.
Has anyone else had this issue?

Best wishes,


ADD COMMENTlink modified 6 days ago by Mike Smith2.7k • written 6 days ago by bekah0

solved - no need for the extra script
file.list=list("CpG_90.txt", "CpG_96.txt")

# read the files to a methylRawList object: myobj
Just read in as above instead

ADD REPLYlink written 6 days ago by bekah0
gravatar for Mike Smith
6 days ago by
Mike Smith2.7k
EMBL Heidelberg / de.NBI
Mike Smith2.7k wrote:

It's not a helpful error message, but the list of files you're providing is empty and so the reading fails.  Here's the contents of file.list:

> file.list
[1] ""

[1] ""

[1] ""

[1] ""

This is because the system.file() function isn't what you need when you're working with your own data. It's a special function that helps R find files that were installed with a package, so examples like in the vignette can be run on any computer, regardless of where the user has installed R.

What you need when swapping in your own data is something more like:

file.list = list( "c:/path/to/my/data/CpG_90.txt",
                  "c:/path/to/my/data/CpG_96.txt" )

Of course you still need to adapt this to supply the path that is appropriate for you.  An alternative is to set the working directory to the folder where your data are, and then you can use only the file names e.g.

file.list = list( "CpG_90.txt",
                  "CpG_96.txt" )
ADD COMMENTlink written 6 days ago by Mike Smith2.7k

please see above - already solved, but cheers :)

ADD REPLYlink written 6 days ago by bekah0

However the second script is still not working - is this likely to be an issue with the output format from bismark?
Error in `[.data.frame`(data, , 6) : undefined columns selected
In addition: Warning message:
In fread(filepath, ...) :
  Starting data input on line 2 and discarding line 1 because it has too few or too many items to be column names or data: Bismark methylation extractor version v0.19.0

EDIT: added in pipeline option to see if this will solve it

ADD REPLYlink modified 6 days ago • written 6 days ago by bekah0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 317 users visited in the last hour