More in detail: I would like to choose one specific column based on a header value from snakemake rule input file and then select this specific column's first value. I was considering something like this: (df['colname'].iloc[0]) but now I am getting confused when {input} comes also into a play. So instead of a 'df' mention above should be {input}. Perhaps there is a better alternative to python .iloc? Thank you in advance for any advice.
Hopefully this addition makes it more clear. I am applying REGENIE software in a snakemake rule.
rule convert_file: input:sumstats/{prefix}.txt.gz output: sumstats/{prefix}.sumstats.gz shell: 'munge_sumstats.py --chunksize 50000 --sumstats {input} --N HERE SHOULD BE {input}['colname'].iloc[0] --out {output}'
So I am not sure how to take first column value for a specific column of an input file while applying it in snakemake rule shell part.