1

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)

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. 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.

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

aaf6
  • 11
  • 2

1 Answers1

2

The package has its own executable named subsample so you need to call your command as follows:

$ subsample -n 1000 deseq.csv > s_des.csv
Ozgur Vatansever
  • 49,246
  • 17
  • 84
  • 119