Hi I have a rscript that reads files from different locations based on a text file.
The text file named scenarios.txt is here:
scenario name directory
2017 Dijn 2017-v0
2022 Pikn 2030-v1
2040 Enn 2040
A sample rscirpt is like the following:
library(tidyverse)
library(sf)
ss = read.delims("Simulations/scenarios.txt")
for(i in rows.along(ss){
gps = st_read(paste0("/usd/clove/simulations/",ss$directory[i],"/trips_gps.gpkg") )
st_write(gps, paste0("/usd/clove/simulations/",ss$directory[i],"/trips_gps_",ss$name[i],".gpkg") )
}
How will I write a snakemake file in such scenarios, where the file path is taken as an input from a text file ?