tg_index with CAF in 32bit - problem

  • Sònia Casillas

    Sònia Casillas - 2011-11-24

    I'm trying to convert a CAF file to a GAP5 database using tg_index. Although the command is running correctly on a 64-bit installation, I need to run it also on a 32-bit installation for an undergraduate teaching class, and this is not working. I get the following error: "Unable to import data for read … on contig … Failed to get sequnce and quality data", for all reads. The conversion from ACE is working, but then I cannot see the qualities of the reads on GAP5.

    Thank you very much for your help.

  • Andrew Whitwham

    Andrew Whitwham - 2011-11-24


    There was a problem with large CAF files and some 32-bit libraries.  The most recent version of the code from subversion should have that fixed.


  • Sònia Casillas

    Sònia Casillas - 2011-11-24

    Hi Andrew,

    Thank you very much for your quick answer. Unfortunately, it doesn't seem to be the same problem since we're using the most recent version of the package (2.0.0b8) and my students' CAF files are really small (~2.5Mb; they're just assembling <1000 reads). The reads we're trying to convert are simulated 454 reads with Flowsim that the students have assembled with the most recent version of MIRA. The error message is:

    Processing CAF file 2077614_out.caf
    Loading 2077614_out.caf…
    Input summary
    Reads 765
    Quality 768
    Contigs 3
    Bases 768
    R + C 768
    Indexed in 0.017479 seconds
    Loading …
    New library 2077614_out.caf
    Failed to get sequnce and quality data
    Unable to import data for read 647:22:fwd on contig 2077614_c1Failed to get sequnce and quality data

    Unable to import data for read 302:1038:fwd on contig 2077614_c3Done 128 reads in 3 contigs.
    No pair queue found
    Run complete pairs.
    27 pairs finished in total.
    Pairs complete
    Loaded in 0.140989 seconds

    However, exactly the same CAF file is perfectly converted into Gap5 in my 64-bit installation. Any ideas? Thank you very much in advance!


  • John Nash

    John Nash - 2011-11-25

    Unfortunately, his advice is correct. i have had several issues with 32-bit versions of the software which do not happen with the 64-bit versions. I have seen them under Ubuntu and SUSE.  If you do a search, I have reported them. 

    The real issue is that the 2.0.0b8 version of the package is so old and out-dated, it is practically useless, unless you are running either Windows, or the 64-bit Linux versions on some computers - then they are still quite good still but not compatible with the version in the source repository.  Anybody who wants to do anything serious with the package really should download the latest source and compile it.

    If I were teaching that class, installing the Staden package would be one of the first things that I would have the class learn to do. One of the things lacking these days with the prevalence of "Apps" is that everybody is too scared to tweak. You are probably reimaging their computers after the course, so give them sudo access and let them learn. Or not :)

    Or (quite understandably, and perhaps more sensibly) do the following for the image that you are putting on their computers.

    It's really a matter of installing libpng, liblzma, tcl, tk, itcl, itk, iwidgets, texlive, and imagemagick via "<your repository package installer> install png", etc.

    For Mac it's "sudo port install libpng", etc. Redhat and Centos use 'yum ', Ubuntu and Debian use 'apt-get'. The packages required for each distro are in the docs.

    Then open a termina and type the following.  Comments are the lines starting with #

    mkdir ~/staden.install

    ## Install tklib (v 0.5) manually from source
    # Fetch the tklib source - curl is a file fetcher. Curl is already installed on Macs and other unix systems:
    cd ~/staden_install
    curl -o tklib-0.5.tar.gz -L

    # Unpack the tarball
    tar zxvf tklib-0.5.tar.gz

    # make and install tklib:
    cd tklib-0.5
    sudo make install

    # IGNORE the installation errors. they're old and out-dated.
    # To check that it's installed, if you are worried, you should see about 22 entries:
    ls /usr/local/lib/tklib0.5/

    ## Install io_lib:
    cd ~/staden_install
    svn co io_lib.trunk
    cd io_lib.trunk
    ./configure -prefix=/usr/local/staden
    make check
    sudo make install

    # To check that it is installed, type:
    ls /usr/local/staden/bin

    # Lots of programs should be there.

    ## Install the Staden package from the latest build - this part takes about 20 minutes:
    cd ~/staden_install
    svn co staden.trunk
    cd staden.trunk/src

    # You should replace the "/opt/local" with "/usr/local" if you are using Linux. I use a Mac most of the time. With Ubuntu, I only needed to include where io_lib, png, lzma and tklib are.

    In fact, you don't even need itcl, itk and iwidgets

    ./configure -disable-rpath -prefix=/usr/local/staden -with-io_lib=/usr/local/staden \
      -with-png=/opt/local/  -with-lzma=/opt/local/ -with-tcl=/opt/local/lib -with-tk=/opt/local/lib \
      -with-tklib=/usr/local/lib/tklib0.5/ -with-itcl=/opt/local/lib/itcl3.4/ -with-itk=/opt/local/lib/itk3.3/ \
    sudo make install

    # To check that it is installed, type:
    ls /usr/local/staden/bin/gap5

    # To make it run easily, tell the system where it is by doing the following.  Make sure there are NO typos. Each user should do this from his/her own account:
    echo "export PATH=$PATH:/usr/local/staden/bin" >> ~/.bash_profile

    # Log out and log back in again to get the previous step to stick or type:
    source ~/.bash_profile

    # Check that gap5 is running by typing:

    # Make the docs:
    cd ~/staden_install/staden.trunk/doc
    make unix PAPER=us
    sudo make install prefix=/usr/local/staden

    # To test, start gap5 and click on 'Help -> Contents'

    ## Uninstalling:
    ## To uninstall the Staden install folder - but I wouldn't bother because the OS sometimes gets upset when that happens:
    rm -rf ~/staden_install

    ## To uninstall the Staden Package:
    sudo rm -r /usr/local/staden

    I hope I have no typos… a 5 line window is hard to edit inside of…


  • James Bonfield

    James Bonfield - 2011-11-25

    We're currently in the process of building binaries for a new release. Sorry it's been so long, but whenever we seem to be getting close our local users have a flurry of crashing with some new bug or other they've discovered.

  • Andrew Whitwham

    Andrew Whitwham - 2011-11-25

    Hi Sonia,

    I thought the problem was only with large CAF files but maybe I'm mistaken.  The bug turned out to be an incompatibility with the 32 bit zlib libraries which is why it works quite happily on the 64 bit machines.

    John's installation tutorial is excellent and, as James says, we are working on a new release.  Hopefully one of these will solve your problems.



  • Sònia Casillas

    Sònia Casillas - 2011-11-25


    Thank you very much for all your quick answers, and specially for John's extensive instructions. I followed them and, even though I got stuck several times throughout the process, I could finally reach the end and make tg_index and gap5 run properly in an Ubuntu 11.10 32-bit installation. This afternoon my students could see the qualities in gap5 (although I didn't make them install the package themselves… :-) ).

    Thanks again!!!

    All the best,



Log in to post a comment.