Closed SwiftSeal closed 1 year ago
Ok. Good sleuthing. So, does it run through if you just strip out the other columns so that it is just the first 4? The GENESPACE input specifications is just a 4-column bed file.
Aye runs fine with 4 columns! Highlighted just in case anyone else encounters a similar issue as the README suggests additional columns are ignored: https://github.com/jtlovell/GENESPACE/blob/893f9022a76b6d8ef99e0b5e43f4d6b0fdf0e200/readme.md?plain=1#L146
Heya,
I'm running the latest devtools install of GENESPACE and ran into an unexpected error. I prefer to write the bed and peptide directories manually with other scripts - in this case the bed files were produced by https://agat.readthedocs.io/en/latest/gff_to_bed.html. A typical entry might look like:
Running
gpar <- init_genespace(wd = getwd(), path2mcscanx = "/blah/blah/MCScanX")
resulted in the following error:I narrowed the issue down to the read_bed function: https://github.com/jtlovell/GENESPACE/blob/1d7b7274bdb142f321b3c46f3af130084b65fa7f/R/utils.R#L297-L313 It seems to be linked to this issue with fread? https://stackoverflow.com/questions/25691637/using-colclasses-and-select-arguments-of-fread-simultaneously
Testing
bd <- fread("morethan4columns.bed", select = 1:4, colClasses = c("character", "numeric", "numeric", "character"), header = FALSE, col.names = c("chr", "start", "end", "id"))
results in:Removing colClasses or switching to 4 column bed files fixes this - I've opted to just fix my external bed processing, but highlighting in case anyone else encounters this as it seems the
read_bed
error seems to fail silently! README says other fields should be ignored also.Cheers! Fantastic software otherwise : - )