我正在使用csv文件读取输入信息。使用所需/选定的输入参数创建dict,并将其传递给shell脚本。我收到丢失的inputfile错误,如下所示:
Building DAG of jobs...
MissingInputException in line 28 of /Users/ravinpoudel/Documents/neoantigen/devs/Snakefile:
Missing input files for rule test_run:
HLA-A02:01
下面是我的蛇形档案
samples = pd.read_csv("acc_filepath_df.csv").set_index("sample", drop=False)
sids=samples['sample']
def info_dict_from_sample(wildcards):
return {
"filepath": samples.loc[wildcards.sample, "filepath"],
"hla": samples.loc[wildcards.sample, "HLA"]
}
expected_filenames = "mhctyped/{sample}.txt.gz"
rule all:
input:
expand(expected_filenames,
zip,
sample=sids)
rule test_run:
input:
unpack(info_dict_from_sample)
output:
"mhctyped/{sample}.txt.gz"
shell:
"cat {input.filepath} {input.hla} > {output}"
没有足够的信息,但我的第一个想法是
info_dict_from_sample
可能会返回一个空字典相关问题 更多 >
编程相关推荐