我使用Snakemake的全局通配符来接收来自文件的输入。我有两种文件: a) fastQ文件和b)程序集(fasta)。我可以使用全局通配符“读取”fastq文件和程序集。
FASTQ, =glob_wildcards( unzip_res + "{fastq}_R1.fastq")#unzipped fastq files
GENOMES, = glob_wildcards( renaming_res + "{genomes}.fasta")#assemblies
FASTQ=set(FASTQ)#set of fastq files
GENOMES=set(GENOMES)#set of assemblies
如何构建两个集合的并集以拥有所有样本?想要的东西是这样的
SAMPLES=union(FASTQ,GENOMES)# NOT Running. all samples
发布于 2020-01-09 21:11:44
Snakemake是在Python语言的基础上构建的,在Python语言中,你可以用|
将两个集合结合起来
SAMPLES = FASTQ | GENOMES
或者,您可以使用:
SAMPLES = FASTQ.copy()
SAMPLES.update(GENOMES)
你喜欢哪一种都行。
https://stackoverflow.com/questions/59660078
复制相似问题