I'm using a snakemake which call an R script , but I'm getting this error :
Error in isOpen(file, "w") : invalid connection
Calls: write.table -> isOpen
Execution halted
my rule in snakemake is :
rule prepare_files:
input:
x = "path_to_x/quant.sf",
y = "path_to_Y/quant.sf"
output:
"out//Bigquantif.txt"
script:
"R/manips.R"
In manips.R i have :
out_file_path <- snakemake@output
x_path <-snakemake@input$x
y_path <-snakemake@input$y
x_fi <- read.table(x_path, head=T, sep="\t", row.names=1)
y_fi <- read.table(y_path, head=T, sep="\t", row.names=1)
merged_data_final <- merge(x_fi, y_fi, by = "gene_id")
write.table(x = merged_data_final, file = out_file_path, sep="\t")
I tried with write.csv and csv2 but always the same error !!
If any one can help, I will be thankful
I was expecting that was a problem of access rights on the repertory i changed it by chmod +x but this didn'nt fixe it