nolanlab / spade

SPADE: Spanning Tree Progression of Density Normalized Events
Other
46 stars 23 forks source link

object 'OUTPUT_DIR' not found #76

Closed wleepang closed 11 years ago

wleepang commented 11 years ago

I'm getting the following error when I run the example code for SPADE.driver:

Error in paste(OUTPUT_DIR, "tables", sep = "/") : 
  object 'OUTPUT_DIR' not found
> traceback()
3: paste(OUTPUT_DIR, "tables", sep = "/")
2: dir.create(paste(OUTPUT_DIR, "tables", sep = "/"), recursive = TRUE, 
       showWarnings = FALSE) at driver.R#227
1: SPADE.driver(data_file_path, out_dir = "../../tmp", cluster_cols = c("marker1", 
       "marker2"))

Perhaps this was supposed to be out_dir as specified in the function arguments?

(note: I installed the github version since the "official" version on BioConductor still lists igraph0 as a dependency)

zbjornson commented 11 years ago

:) You happened to download the github version while I've been hacking at it without much QA. Just fixed this bug, thanks for catching. Try installing again.

wleepang commented 11 years ago

Greatly appreciate the impressively rapid turnaround :)

Unfortunately, I'm now getting another error:

Producing tables...
Error in file(file, ifelse(append, "a", "w")) : 
  cannot open the connection
In addition: Warning message:
In file(file, ifelse(append, "a", "w")) :
  cannot open file 'U:/tmp//tables/bySample/U:/tmp/SimulatedRawData.fcs.density.fcs.cluster.fcs.anno.Rsave_table.csv': No such file or directory
> traceback()
7: file(file, ifelse(append, "a", "w"))
6: write.table(pivot, file = paste(out_dir, "/tables/bySample/", 
       name, "_table", ".csv", sep = ""), row.names = FALSE, col.names = TRUE, 
       sep = ",", dec = ".", qmethod = "double")
5: eval(expr, envir, enclos)
4: eval(expr, p)
3: eval.parent(Call)
2: write.csv(pivot, file = paste(out_dir, "/tables/bySample/", name, 
       "_table", ".csv", sep = ""), row.names = FALSE) at driver.R#262
1: SPADE.driver(data_file_path, out_dir = "U:/tmp", cluster_cols = c("marker1", 
       "marker2"))

perhaps using file.path() and sprintf() instead of paste():

file=file.path(out_dir, 'tables', 'bySample', sprintf('%s_table.csv', name))
zbjornson commented 11 years ago

Ugh, sorry. Until I fix that, you might try downloading this instead, which no longer depends on igraph0 and doesn't have that bit of code I added that's breaking.

https://github.com/nolanlab/spade/archive/2f2d21a22a522918807eb270cd3fe30526aed651.zip

wleepang commented 11 years ago

Thanks, using the older commit works without error.