python2.6中子样本为0.0.6的错误

时间:2015-02-13 21:19:46

标签: python linux subsampling

我正在尝试在python2.6.6中运行subsample0.0.6包(为了能够运行类似"> subsample -n 1000 big_data.csv"在python中)

安装子样本之后,在我检查" import subsample"后,它似乎首先工作,但是当我移动到另一个目录并尝试运行命令时,我收到错误。谁能告诉我们发生了什么,或者我应该从这里做些什么?

[sbsuser@localhost ~]$ python2.6
Python 2.6.6 (r266:84292, Nov 21 2013, 10:50:32)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import subsample
>>> help(subsample)
>>> import numpy
>>> import HTSeq
>>> quit()
[sbsuser@localhost ~]$ cd /illumina/runs/
[sbsuser@localhost runs]$ python2.6 subsample -n 1000 deseq.csv > s_des.csv
python2.6: can't open file 'subsample': [Errno 2] No such file or directory
[sbsuser@localhost runs]$ python2.6 subsample.py -n 1000 deseq.csv >       s_des.csv
Traceback (most recent call last):
   File "subsample.py", line 4, in <module>
    fraction = float( sys.argv[1] )
ValueError: invalid literal for float(): -n
[sbsuser@localhost runs]$ python2.6
Python 2.6.6 (r266:84292, Nov 21 2013, 10:50:32)
linux2上的

[GCC 4.4.7 20120313(Red Hat 4.4.7-4)]     输入&#34; help&#34;,&#34; copyright&#34;,&#34; credit&#34;或&#34;许可证&#34;了解更多信息。

  
    
      

导入子样本           Traceback(最近一次调用最后一次):             文件&#34;&#34;,第1行,in             文件&#34; subsample.py&#34;,第4行,in               fraction = float(sys.argv [1])           IndexError:列表索引超出范围

    
  

1 个答案:

答案 0 :(得分:2)

package有自己的名为subsample的可执行文件,因此您需要按如下方式调用命令:

$ subsample -n 1000 deseq.csv > s_des.csv