1

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

在安装 subsample 之后,在我检查“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)

[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] 在 linux2 上键入“帮助”、“版权”、“信用”或“许可证”以获取更多信息。

导入 subsample Traceback(最近一次调用最后一次):文件“”,第 1 行,在文件“subsample.py”中,第 4 行,infraction = float(sys.argv[1]) IndexError: list index out of range

4

1 回答 1

2

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

$ subsample -n 1000 deseq.csv > s_des.csv
于 2015-02-13T21:23:14.763 回答