title: Mix shell command in environment conda with python scripts
body: <p>I would like to mix shell command in environment conda with any Python scripts, so the use of the 'run' section isn't possible ...</p>
  <p>I tried :</p>
  <pre><code>shell:&quot;&quot;&quot;
     gunzip -c {input.ech} | NanoFilt -l {params.min_length} --maxlength {params.max_length} -s {input.summary} -q {params.q} --readtype {params.rd} | gzip &gt; Working_space_ont/01_nanofilt/{wildcards.sample}_filt_{params.q}.fastq.gz   
     python3 reinit.py
     while [[ -f Working_space_ont/01_nanofilt/{wildcards.sample}_filt_{params.q}.fastq.gz ]] &amp;&amp; [[ grep -c '&gt;' Working_space_ont/01_nanofilt/{wildcards.sample}_filt_{params.q}.fastq.gz &lt; {params.cov} ]]; do
         python3 quality_minor.py
         gunzip -c {input.ech} | NanoFilt -l {params.min_length} --maxlength {params.max_length} -s {input.summary} -q {params.q} --readtype {params.rd} | gzip &gt; Working_space_ont/01_nanofilt/{wildcards.sample}_filt_{params.q}.fastq.gz
     done
     mv Working_space_ont/01_nanofilt/{wildcards.sample}_filt_{params.q}.fastq.gz {output} 
  &quot;&quot;&quot;
  </code></pre>
  <p>I have non-zero exit status 1 error</p>
  <p>reinit.py :</p>
  <pre><code>import yaml
  
  with open(&quot;config_wf.yaml&quot;) as f:
      old_yaml = yaml.load(f)
  
  old_yaml[&quot;params&quot;][&quot;filtration&quot;][&quot;quality&quot;] = old_yaml[&quot;params&quot;][&quot;filtration&quot;][&quot;quality_fix&quot;]  
  
  with open(&quot;config_wf.yaml&quot;, 'w') as f:
      yaml.dump(old_yaml, f, default_flow_style=False)
  
  </code></pre>
  <p>quality_minor.py :</p>
  <pre><code>import yaml
  
  with open(&quot;config_wf.yaml&quot;) as f:
      old_yaml = yaml.load(f)
  
  old_yaml[&quot;params&quot;][&quot;filtration&quot;][&quot;quality&quot;] -= 1
  
  with open(&quot;config_wf.yaml&quot;, 'w') as f:
      yaml.safe(old_yaml, f, default_flow_style=False)
  
  </code></pre>
  <p>Do you have any ideas for me? <br />
  Best Regards, <br />
  <br />
  Eva</p>