我试图在python2.6.6中运行subsample0.0.6包(以便能够在python中运行“>subsample-n 1000 big_data.csv”之类的程序)
安装子样本之后,在我检查了“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)
【合同一般条件4.4.7 20120313(红帽4.4.7-4)】关于Linux2
键入“帮助”、“版权”、“信用”或“许可证”以获取详细信息。
导入子样本
回溯(最近一次呼叫时间):
文件“”,第1行,在
文件“subsample.py”,第4行,in
分数=浮点(sys.argv[1])
索引器错误:列表索引超出范围
最佳答案
package有自己的名为subsample
的可执行文件,因此需要按如下方式调用命令:
$ subsample -n 1000 deseq.csv > s_des.csv