擅长:python、mysql、java
<p>如果您的输入文件实际上是一个文件(在您的示例中是这样的),而不是来自其他进程的管道数据,我认为您不应该在subprocess.call完全发挥作用!<br/>
据我所知,不能通过STDIN向普通命令行bowtie提供索引-它必须是一个文件。所以这肯定需要一个正常的论点,而不是来自STDIN。在</p>
<p>这是我通常从脚本调用bowtie的方式(输入文件和索引都是文件,不使用STDIN):</p>
<pre><code>subprocess.call(["bowtie %s %s %s %s"(full_options,indexname,infile,outfile)],
shell=True)
</code></pre>
<p>其中<code>full_options</code>类似于<code>'-f -m1 -v1 best tryhard -S sam-nosq'</code>,而{<cd3>}则类似于{<cd4>}(这是一组索引文件名的基名,格式为Chlre4nm_case\unew_m.*.ebwt,位于shell环境变量<code>$BOWTIE_INDEXES</code>给出的目录中,这是bowtie检测其索引文件的方式)。在</p>
<p>我知道我可能在用subprocess.call很糟糕,应该把我的命令/options/args拆分成一个列表,就像在另一个答案中一样-这是旧代码,但它确实有效。在</p>