gravatar for User000

2 hours ago by

Dear all,

I have files like this:

bob/dad.vcf
bob/mom.vcf
bob/son.vcf
john/dad.vcf
john/mom.vcf
john/son.vcf
steve/dad.vcf
steve/mom.vcf
steve/son.vcf

I want to find the intersect and see how many dads, moms and sons are in common, i.e. bob/dad.vcf with john/dad.vcf, then bob/dad.vcf with steve/dad.vcf and so on. The problem is I do not know how to put directories as wildcards as well since they are different:

(DIR, SAMPLES) =glob_wildcards('/path/to/{dir}/{sample}.vcf')
 rule all:
    input: 
        expand("{sample}.common_bob_john", zip,  sample=SAMPLES, dir=DIR)

rule bedtools_common:
    input:
        in1="/path/to/bob/{sample}.vcf",
        in2 = "/path/to/john/{sample}.vcf"
    output:
        out1="{sample}.common_bob_john"
    shell:
        """
        /Tools/bcftools-1.10.2/bcftools isec {input.in1} {input.in2} -p {output.out1}
        """

link

modified 1 hour ago

written
2 hours ago
by

User000410



Source link