Common Problems

Download Tips

Phred "Unknown Chemistry"

Phred on Windows

Phred on Windows Troubleshooting

This page describes some problems you may encounter with running Phred through InterPhace on Windows. Before reading on, first make sure that you have both Phred and InterPhace installed - these are two separate programs, and you will need to run two separate installers.

The most common error messages are:

  • "Could not find the phred file to execute".
  • warning: 'PHRED_PARAMETER_FILE' environment variable not set (followed by additional warning for every input file)

The typical cause of both problems is that the autoexec.bat file does not contain the correct instructions.

Another common error encountered when running Phred, the "unknown chemistry" error, is described on a separate page.

The autoexec.bat file must contain two lines that indicate the path to the phred programs (phred.exe), and to the Phred parameter file:

SET PATH=C:\PROGRA~1\CODONC~1
SET PHRED_PARAMETER_FILE=C:\Program Files\CodonCode\phredpar.dat

The two lines above assume that you installed Phred at the standard location on the C: drive. If you installed at a different location, you may need to change them accordingly (the PATH should not contain any spaces, as in the example above).

The line where the PATH is set may be longer, if other programs are also using the autoexec.bat file. Also, the "SET " may be missing before the path. Here's another legitimate example:

PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\PROGRA~1\COMMON\INSTALLSHIELD;C:\PROGRA~1\CODONC~1

Typically, the installer will modify the autoexec.bat file during the install, but depending on your system and security settings, this may sometimes fail. In this case, please follow the instructions in the next section.

 

Step-by-step instructions

Log in at the computer where you have Phred and InterPhace installed. Depending on your system and security settings, you may have to log in as system administrator or using your typical user account. You can try one first, and the other one if needed. Next:

  1. Open NotePad (typically in "Start Menu" => "Programs" => "Accessories").
  2. Select "File" => "Open".
  3. In the "Files of type" pull-down menu at the bottom of the dialog, select "All files (*.*).
  4. Navigate to your system drive (typically C:).
  5. Click on "AUTOEXEC.BAT", then click "Open". If the file does not exist, click "Cancel"; we will create this file now.
  6. The file you are looking at may be empty, or it may already contain a number of lines.
    Look for a line starting with "SET PATH=" or "PATH=".
  7. If you found a line defining the PATH:
    add the path to Phred (typically C:\PROGRA~1\CODONC~1) to it's end. For example, change:
    SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND
    to
    SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND; C:\PROGRA~1\CODONC~1
    Change the location, if needed. Make sure you add a semi-colon (';') before C:\PROGRA~1\CODONC~1!

    If you did not find a line defining the PATH:
    Add the following line to the end of the file:
    SET PATH=C:\PROGRA~1\CODONC~1
    Again, you may need to change the line if you did install Phred at a different location.
  8. Now, add this line to define where the Phred parameter file is to the end of the file::
    SET PHRED_PARAMETER_FILE=C:\Program Files\CodonCode\phredpar.dat
  9. Save the file, using "Save" in the "File" menu. If you did not find an existing file in Step 5, you will get a "Save as" dialog box. Save the file as "AUTOEXEC.BAT" on you system drive (typically "C:").
  10. Reboot the computer.This is essential!
  11. After re-booting, try running Phred again. Hopefully, everything works fine now.
  12. If you are still having problems, first check your autoexec.bat file for any misspellings. If it is missing, or does not have the changes that you just added, you may need to contact your system administrator to find out what might have happened to it.
If this fails the first time around, and you did reboot, then you can try again, but this time, log in as adminstrator (if you used your usual user name before) or using your regular user name (if you logged ina s administrator before).

 

For the curious

This section is intended for system administrators, hackers, and those who are just curious and would like to know more.

Why we are using autoexec.bat

The autoexec.bat file comes originated in DOS, and is supposedly not needed anymore in Windows. In Windows, the Registry is the place where environment variables and the location of executables are defined - at least most of the time. In our tests, we found that Windows registry entries are often ignored completely when running a command line program like Phred from Java, although this varies between different versions of Windows.

The only way to define the Phred parameter file that worked in all Windows versions we tested was to use the autoexec.bat file. The drawback, however, is that the installer is not always successful in modifying the autoexec.bat file.Also, even if the installer works fine, some "utility" and anti-virus programs may undo the changes by replacing the autoexec.bat file with a backup copy when restarting.This then requires manual change ... but maybe we should just be thankful to the Seattle billionaires that they let us still use Java on Windows!

More readings from Microsoft

There are a number of documents on Microsoft web sites that discuss the autoexec.bat files on different OS versions. Some useful ones:

User environment variables on NT and 2000 (yes, autoexec.bat is officially supported): http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q100843&

Hanging during logon because of encrypted autoexec.bat files: http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q269397&

More about MS-DOS programs and Windows: http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q165214&

 

Alternatives (or: if all else fails)

If setting the PATH and defining the PHRED_PARAMETER_FILE is really problematic for your setup, there is one alternative you could consider: using a batch script to run Phred. In the InterPhace settings file, you can define which program is called when running Phred. If you make this a script that calls Phred after first defining the Phred parameter file, you don't need the autoexec.bat file.

Here's an example. First, create a file called "runphred.bat" in C:\Program Files\CodonCode". The file should contain these two lines:

SET PHRED_PARAMETER_FILE=C:\Program Files\CodonCode\phredpar.dat
C:\Progra~1\Codonc~1\phred %1 %2 %3 %4 %5 %6 %7 %8 %9

This will pass up to nine command line parameters to Phred, which seems to be the limit for .BAT files. But that should (almost) always be plenty.

Next, you need to edit the InterPhace settings file. Use NotePad to open the file "ip_settings.txt" in the InterPhace folder (usually C:\Program Files\CodonCode\InterPhace\).Scroll down until you see the lines:

#IP_PATH_TO_PROGRAMS C:/Progra~1/CodonCode/
# The name of the Phred executable (should be 'phred')
IP_PHRED_EXECUTABLE phred

Change them to read:

IP_PATH_TO_PROGRAMS C:/Progra~1/CodonCode/
# The name of the Phred executable (should be 'phred')
IP_PHRED_EXECUTABLE runphred.bat

and then save the file. Start (or restart) InterPhace, and try it out.

© CodonCode Corporation. All Rights Reserved.