【发布时间】:2022-12-03 00:34:12
【问题描述】:
我正在尝试运行一个 snakemake 文件,但它产生了一个奇怪的结果
refseq = 'refseq.fasta' reads = '_R1_001' reads2 = '_R2_001' configfile: "config.yaml" ## Add config def getsamples(): import glob test = (glob.glob("*.fastq.gz")) samples = [] for i in test: samples.append(i.rsplit('_', 2)[0]) print(samples) return(samples) def getbarcodes(): with open('unique.barcodes.txt') as file: lines = [line.rstrip() for line in file] return(lines) rule all: input: expand("called/{barcodes}{sample}_called.vcf", barcodes=getbarcodes(), sample=getsamples()), expand("mosdepth/{barcodes}{sample}.mosdepth.summary.txt", barcodes=getbarcodes(), sample=getsamples()) rule fastq_grep: input: R1 = "{sample}_R1_001.fastq.gz", R2 = "{sample}_R2_001.fastq.gz" output: "grepped/{barcodes}{sample}_R1_001.plate.fastq", "grepped/{barcodes}{sample}_R2_001.plate.fastq" shell: "fastq-grep -i '{wildcards.barcodes}' {input.R1} > {output} && fastq-grep -i '{wildcards.barcodes}' {input.R2} > {output}"我的目录中有文件末尾带有 *.fastq.gz 的文件,但我得到了这个:
缺少规则 fastq_grep 的输入文件: 0_R1_001.fastq.gz 0_R2_001.fastq.gz
这两个文件不存在,它从哪里得到它们?
我希望在我的目录中看到很多 fastq 文件,但它只列出了一个不存在的文件。
【问题讨论】:
标签: python bash bioinformatics snakemake