【发布时间】:2023-01-20 08:57:27
【问题描述】:
我有一个 nextflow 脚本,它在单个 vcf 文件上运行几个进程。文件名为“bos_taurus.vcf”,位于目录 /input_files/bos_taurus.vcf 中。目录 input_files/ 还包含另一个文件“sacharomyces_cerevisea.vcf”。我希望我的 nextflow 脚本能够处理这两个文件。我试图使用像 ch_1 = channel.fromPath("/input_files/*.vcf") 这样的 glob 模式,但遗憾的是我找不到可行的解决方案。任何帮助将非常感激。
#!/usr/bin/env nextflow
nextflow.enable.dsl=2
// here I tried to use globbing
params.input_files = "/mnt/c/Users/Lenovo/Desktop/STUDIA/BIOINFORMATYKA/SEMESTR_V/PRACOWNIA_INFORMATYCZNA/nextflow/projekt/input_files/*.vcf"
params.results_dir = "/mnt/c/Users/Lenovo/Desktop/STUDIA/BIOINFORMATYKA/SEMESTR_V/PRACOWNIA_INFORMATYCZNA/nextflow/projekt/results"
file_channel = Channel.fromPath( params.input_files, checkIfExists: true )
// how can I make this process work on two files simultanously
process FILTERING {
publishDir("${params.results_dir}/after_filtering", mode: 'copy')
input:
path(input_files)
output:
path("*")
script:
"""
vcftools --vcf ${input_files} --mac 1 --minQ 20 --recode --recode-INFO-all --out after_filtering.vcf
"""
}
【问题讨论】:
标签: bash groovy pipeline bioinformatics nextflow