title: Combine shell command lines in snakemake
body: <p>I would like to combine two command lines as one single to avoid the intermediate files.</p>
  
  <pre><code>workdir: "/path/to/workdir/"
  
  rule all:
      input: 
          "my.filtered.vcf.gz"
  
  rule bedtools:
      input:
          invcf="/path/to/my.vcf.gz",
          bedgz="/path/to/my.bed.gz"
      output:
          outvcf="my.filtered.vcf.gz"
      shell:
          "/Tools/bedtools2/bin/bedtools intersect -a {input.invcf} -b {input.bedgz} -header -wa |"
          "/Tools/bcftools/bcftools annotate -c CHROM,FROM,TO,GENE -h &lt;(echo '##INFO=&lt;ID=GENE,Number=1,Type=String,Description="Gene name"&gt;') &gt; {output.outvcf}"
  </code></pre>
  
  <p>I am getting invalid syntax error. I would appreciate if you could explain how to combine multiple shell lines in snakemake.</p>