title: Missing input snakemake expand error mixes inputs
body: <p>My snakemake workflow prints it mixes the inputs.</p>
  <blockquote>
  <p>MissingInputException in line 21 of /scratch/blumenscheitc/workplace_5z/diaa_nn_fasta/Snakefile:
  Missing input files for rule prokka:
  genome/real_name_hypo_200707_20-07797_19-03322_S19.fasta.fasta</p>
  </blockquote>
  <p>I have no idea why sadly.
  The code is below.
  I wrote a lot of workflows like that but this one doesn't work.</p>
  <p>Thanks for any help!</p>
  <pre><code>import sys
  import os
  
  shell.executable('/bin/bash')
  
  IDS, = glob_wildcards('genome/{sample}.fasta')
  
  rule all:
      input:
          expand('results/proteome_DIA_input_{sample}.fasta', sample=IDS),
          expand('temp/real_name_hypo_{sample}.fasta', sample=IDS),
          expand('temp/real_name_hypo_{sample}.tsv', sample=IDS),
          expand('temp/names_hypo_{sample}.data', sample=IDS),
          expand('temp/hypo_count_{sample}.fasta', sample=IDS),
          expand('temp/non_hypo_{sample}.fasta', sample=IDS),
          expand('temp/hypo_{sample}.fasta', sample=IDS),
          expand('temp/{sample}.fasta', sample=IDS),
          expand('proteomes/{sample}.gbk', sample=IDS),
          expand('temp/{sample}', sample=IDS),
  
  rule prokka:
      input:
          'genome/{sample}.fasta',
      output:
          'temp/{sample}',
      shell:
          '''
          prokka {input} -prefix proteome --addgenes --compliant --outdir {output} --cpu 40
          '''
  
  rule prokka_rename:
      input:
          'temp/{sample}',
      output:
          'proteomes/{sample}.gbk',
      shell:
          '''
          cp '{input}/proteome.gbk' '{output}'
          '''
  
  rule gbk2fasta:
      input:
          'proteomes/{sample}.gbk',
      output:
          'temp/{sample}.fasta',
      shell:
          '''
          python scripts/gbk2fa_prot.py {input} {output}
          '''
  
  rule hypo_fasta:
      input:
          'temp/{sample}.fasta',
      output:
          'temp/hypo_{sample}.fasta',
      shell:
          '''
          seqkit grep -w 0 -rnip 'hypothetical' {input} &gt; {output}
          '''
  
  rule non_hypo_fasta:
      input:
          'temp/{sample}.fasta',
      output:
          'temp/non_hypo_{sample}.fasta',
      shell:
          '''
          cat {input} | grep -v '^&gt;' | grep '^.' | tr -d '[:blank:]' | cat &gt;( echo '&gt;seq_name') - &gt; {output}
          '''
  
  rule hypo_fasta_count:
      input:
          'temp/hypo_{sample}.fasta',
      output:
          'temp/hypo_count_{sample}.fasta',
      shell:
          &quot;&quot;&quot;
          seqkit replace -p .+ -r &quot;hypothetical_protein_{{nr}}&quot; {input} &gt; {output}
          &quot;&quot;&quot;
  
  rule diamond_hypo:
      input:
          'temp/hypo_count_{sample}.fasta',
      output:
          'temp/blast_hypo_{sample}.data',
      shell:
          '''
          diamond blastp -b 20 --threads 40 --max-target-seqs 1 --db &quot;/home/xxxxxxxxxxxxx/wissdaten/ZBS6_Orbitrap/xxxxxxxx/Databases/uni_bac.dmnd&quot; -f 6 sseqid full_qseq --query {input} --out {output}
          '''
  
  rule hypo_header:
      input:
          'temp/names_hypo_{sample}.data',
      output:
          'temp/real_name_hypo_{sample}.tsv',
      script:'scripts/hypo_header.R'
  
  rule hypo_tsv2fasta:
      input:
          'temp/real_name_hypo_{sample}.tsv',
      output:
          'temp/real_name_hypo_{sample}.fasta',
      shell:
          '''
          seqkit tab2fx {input} &gt; {output}
          '''
  
  rule combine_fasta:
      input:
          I1='temp/real_name_hypo_{sample}.fasta',
          I2='temp/non_hypo_{sample}.fasta',
      output:
          'results/proteome_DIA_input_{sample}.fasta',
      shell:
          '''
          cat {input.I2} {input.I1} &gt; {output}
          '''
  </code></pre>