Can anybody help me understand if it is possible to access sample details from a config.yml file when the sample names are not written in the snakemake workflow? This is so
I would suggest using a tab-delimited file in order to store samples information.
sample.tab:
Sample Tag
1 S1
2 S2
You could store the path to this file in the config file, and read it in your Snakefile.
config.yaml:
sample_file: "sample.tab"
Snakefile:
configfile: "config.yaml"
sample_file = config["sample_file"]
samples = read_table(sample_file)['Sample']
tags = read_table(sample_file)['Tag']
This way your can re-use your workflow for any number of samples, with any number of columns.
Apart from that, in Snakemake usually you can escape curly brackets by doubling them, maybe you could try that.
Good luck!