Error when running PhiSpy
0
0
Entering edit mode
8.0 years ago

I am running the tutorial from https://github.com/linsalrob/PhiSpy After following the instructions, I ran the command

./PhiSpy.py -i Test_Organism/160490.1/ -o output_directory -t 25

I get the following error message

Making Test Set... (need couple of minutes)
   cant open file 1
   error: Shannon does not work
   The input organism is too small to predict prophages. Please consider large contig (having at least 40 genes) to use PhiSpy.

I then ran PhiSpy on another RAST annotated genbank directory of another WGS assembly, and I still get the same error message. I have the versions of Python, biopython, gcc and randomForest as per spec.

Any suggestions?

PhiSpy • 2.4k views
ADD COMMENT
0
Entering edit mode

It seems to complain that it can't open a file first, so the first thing to check is that the files exist - does the folder Test_Organism/160490.1/ exist and located in the directory you are running PhiSpy from? Are there files in there? Does output_directory need to be created before running? If so is it there?

ADD REPLY
0
Entering edit mode

I started reading the code and didn't get very happy by that...

ADD REPLY
0
Entering edit mode

The Shanon does not work error, looks like its triggered just after here:

a = input_shannon_mer(INSTALLATION_DIR+'data/mer_ORF_list.txt')

So would guess it can't find data/mer_ORF_list.txt - does that file/folder exist?

The INSTALLATION_DIR is defined here:

INSTALLATION_DIR = argv[0]
    if '/' in argv[0]:
        INSTALLATION_DIR = INSTALLATION_DIR[0:len(INSTALLATION_DIR)-INSTALLATION_DIR[::-1].find('/')]
    else:
        INSTALLATION_DIR = ''

Instructions to run are:

1. Download the example Organism directory (Test_Organism.zip) from http://sourceforge.net/projects/phispy/files/
2. Uncompress Test_Organism.zip
3. Move 'Test_Organism' to PhiSpy-X.X directory
4. % cd PhiSpy-X.X
5. % ./PhiSpy.py -i Test_Organism/160490.1/ -o output_directory -t 25

Only thing I can think off is either Test_Organism doesn't exist or its not picking up the installation dir properly

ADD REPLY
0
Entering edit mode

My guess was the second option but didn't look too long at it.

ADD REPLY
0
Entering edit mode

@brindha, you could maybe try:

PhiSpy.py -i Test_Organism/160490.1/ -o output_directory -t 25

Or

/Full/Path/To/Folder/PhiSpy.py -i Test_Organism/160490.1/ -o output_directory -t 25
ADD REPLY
0
Entering edit mode

Thanks for your reply. The Test_Organism.zip was obtained from https://github.com/linsalrob/EdwardsLab/blob/master/PhiSpy/Test_Organism.zip It does not contain the Test_Organism/160490.1/data/mer_ORF_list.txt or even the Test_Organism/160490.1/data directory or the Test_Organism/160490.1/data/trainingSet directory. Therefore, I downloaded this separately from https://github.com/linsalrob/EdwardsLab/tree/master/PhiSpy/data into a new subdirectories /data and /data/trainingSet within Test_Organism/160490.1/

I get the following error when I run it.

     ./PhiSpy.py -i Test_Organism/160490.1/ -o output_directory -t 25 
Making Test Set... (need couple of minutes) 
Start Classification Algorithm 
Using training flag:  25 Traceback (most recent call last):  
File "./PhiSpy.py", line 157, in <module>
        start_propgram(sys.argv)   File "./PhiSpy.py", line 155, in start_propgram
        call_phiSpy(organismPath,output_dir,trainingFlag,INSTALLATION_DIR,args_parser.evaluate, args_parser.number, args_parser.window_size,args_parser.quiet,args_parser.keep)   File "./PhiSpy.py", line 31, in call_phiSpy
        classification.call_classificaton(organismPath,output_dir,trainingFlag,INSTALLATION_DIR) File "./source/classification.py", line 249, in call_classificaton
        call_randomForest_generic(output_dir+'testSet.txt',trainingFlag,output_dir+'classify.txt',INSTALLATION_DIR) File "./source/classification.py", line 22, in call_randomForest_generic
        x = find_training_genome(trainingFlag,INSTALLATION_DIR)   File "./source/classification.py", line 15, in find_training_genome
        if int(temp[0]) == trainingFlag: ValueError: invalid literal for int() with base 10: ''
ADD REPLY
0
Entering edit mode

And what about /Full/Path/To/Folder/PhiSpy.py -i Test_Organism/160490.1/ -o output_directory -t 25 ?

ADD REPLY
0
Entering edit mode

Tried that command as suggested with the full path. It still gives the same error that I have captured in my earlier comment.

I then tried running PhiSpy with another genome directory (10479.4 ) downloaded from the database linked in ReadMe.md. I continue to get the same errors. Moreover any genome directory does not seem have the /data and /data/trainingSet folders that the python script refers to.

Do you run PhiSpy yourself of late? Have you encountered these errors I seem to get? Any help would be appreciated.

ADD REPLY
0
Entering edit mode

I never used it, just making guesses :)

ADD REPLY
0
Entering edit mode

Bumping this post up, if it is okay.

Pls see the thread above on my reply/query on this error.

ADD REPLY

Login before adding your answer.

Traffic: 2121 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6