参考
-
2 https://stackoverflow.com/questions/56271154/use-snakemake-pair-end-bwa-alignment
-
3 https://bioinformaticsonline.com/snippets/view/43590/rules-to-run-fastp-snakemake
import os
import glob
input_folder = "/home/myan/scratch/private/pome_WGS/huoyan_14_variety/"
output_folder = "/home/myan/scratch/private/practice_data/snakemake/20220412/fastp.results/"
SRA,FRR = glob_wildcards(input_folder+"{sra}_{frr}.fq.gz")
rule all:
input:
expand(output_folder+"{sra}.html",sra=SRA),
expand(output_folder+"{sra}.json",sra=SRA)
rule fastp:
input:
read01 = input_folder + "{sra}_1.fq.gz",
read02 = input_folder + "{sra}_2.fq.gz"
output:
read01 = output_folder + "{sra}_1.clean.fq.gz",
read02 = output_folder + "{sra}_2.clean.fq.gz",
html = output_folder + "{sra}.html",
json = output_folder + "{sra}.json"
threads:
8
shell:
"""
fastp -i {input.read01} -I {input.read02} -o {output.read01} -O {output.read02} --thread {threads} --html {output.html} --json {output.json}
"""
这里rule all的作用还是没有搞明白,看有的文档说是最终保留的文件 ,我这里rule all 只写了了最终的html和json,但是最终的结果里是有过滤后的fastq文件的
还有好多基础知识需要看
网友评论