Entering edit mode
3.6 years ago
lmlukoseviciute
▴
60
Hello,
I hava an R script (called dalink_st.r) to divide data frame into two columns and then save them to two separate files.
#!/usr/bin/Rscript
lentele=read.table(snakemake@input[[1]], sep=",")
pirmas=lentele[1]
antras=lentele[2]
write.table(pirmas, snakemake@output[[1]])
write.table(antras, snakemake@output[[2]])
I call this script with snakemake rule.
rule all:
input:
"outputs/r/pirmas.txt",
"outputs/r/antras.txt"
rule bandom_r:
input:
"inputs/r/lentele.csv"
output:
"outputs/r/pirmas.txt",
"outputs/r/antras.txt"
conda:
"env/r4.yaml"
script:
"bins/dalink_st.r"
And once I call
snakemake --use-conda
I get an error message
Would appreciate any ideas on why it is not working.
Thank you in advance.
Couldn't you just use
awk
? You're installing entireR
packages to split a table into two.Yeah I understand what you mean and it is true, and just the simple
cut -d ","
would work. But this was a small part of my bigger script in R used for differential gene expression analyses for writing DESeq objects to file.