简体   繁体   English

python2.6中子样本0.0.6的错误

[英]errors with subsample 0.0.6 in python2.6

I am trying to run the subsample0.0.6 package in python2.6.6 (to be able to run something like "> subsample -n 1000 big_data.csv" in python) 我正在尝试在python2.6.6中运行subsample0.0.6包(以便能够在python中运行“>”> subsample -n 1000 big_data.csv“之类的东西)

after installing subsample it seems to work at first after I check with "import subsample", but then when I move to a different directory and attempt to run the command, I get an error. 安装子样本后,似乎首先检查了“ import subsample”,然后才能工作,但是随后当我移至其他目录并尝试运行命令时,出现错误。 Can anyone tell what is going on, or what I should do from here? 谁能告诉我发生了什么,或者我应该从这里做什么?

[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)] on linux2 Type "help", "copyright", "credits" or "license" for more information. linux2上的[GCC 4.4.7 20120313(Red Hat 4.4.7-4)]键入“帮助”,“版权”,“信用”或“许可证”以获取更多信息。

import subsample Traceback (most recent call last): File "", line 1, in File "subsample.py", line 4, in fraction = float( sys.argv[1] ) IndexError: list index out of range 导入子样本回溯(最近一次调用最近):文件“”,行1,在文件“ subsample.py”,行4,在分数= float(sys.argv [1])IndexError:列表索引超出范围

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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM