Question: Error when running PhiSpy
0
gravatar for bioinfoSeeker
2.6 years ago by
United Kingdom
bioinfoSeeker20 wrote:

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 • 825 views
ADD COMMENTlink modified 2.5 years ago • written 2.6 years ago by bioinfoSeeker20

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 REPLYlink modified 2.6 years ago • written 2.6 years ago by Tonor420

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

ADD REPLYlink modified 2.6 years ago • written 2.6 years ago by WouterDeCoster40k

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 REPLYlink written 2.6 years ago by Tonor420

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

ADD REPLYlink written 2.6 years ago by WouterDeCoster40k

@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 REPLYlink written 2.6 years ago by Tonor420

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 REPLYlink modified 2.5 years ago • written 2.5 years ago by bioinfoSeeker20

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

ADD REPLYlink written 2.5 years ago by WouterDeCoster40k

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 REPLYlink written 2.5 years ago by bioinfoSeeker20

I never used it, just making guesses :)

ADD REPLYlink written 2.5 years ago by WouterDeCoster40k

Bumping this post up, if it is okay.

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

ADD REPLYlink modified 2.5 years ago • written 2.5 years ago by bioinfoSeeker20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 968 users visited in the last hour