I have a script called config.r and it is like that :
# General info
exp_name = 'Exp_1'
file_in = '/dim/data/SRR23445.fastq'
# Quality
trim_q = 10
trim_str = 3
# Mapping
multimaps = 3
I would like instead of changing the config file everytime to have an argument menu for each of those parameters. The user would me able to specify the name of the output file the parameters for mapping for quality etc How can i do this in R?
if you want to pass the arguments (similar to Unix - bash style), you need to use Rscript, instead of interactive R. Check this
https://www.r-bloggers.com/passing-arguments-to-an-r-script-from-command-lines/
Have a look at this package: https://cran.r-project.org/web/packages/docopt/index.html
may be snakemake can do this. It supports passing config files to R.