Gap5 and Caftools

2009-04-08
2013-04-18
  • Nobody/Anonymous

    Hi
    I tried the new gap5 I installed it and the main window appears, trying to convert my gap4 project by gap2caf-->caf2baf seems it needs Caftools.pm, I had it on my computer, linked by "use lib '/path/to/Caftools.pm' " in the script, an old one I have.... but  now the script says that

    Can't locate object method "get_assembled_from" via package "Caftools" (line 23 (more or less))

    Somebody know where to found the correct Caftools.pm I suppose mine is too old and this object method is not implemented.

    Thank you in advance,

    I am happy to try gap5.

     
    • Sven Klages

      Sven Klages - 2009-04-08

      Just download it from sanger,

      http://www.sanger.ac.uk/Software/formats/CAF/

      It's part of the miniphrap2gap package.

      cheers,
      Sven

       
    • James Bonfield

      James Bonfield - 2009-04-08

      I'd forgotten I have had caf2baf lurking in that installation still.

      You won't really gain much going from gap4 to gap5 and you'll lose a lot. The main purpose of gap5 is to deal with the things that gap4 cannot - specifically VAST quantities of data. Over time the more useful gap4 abilities will migrate of course.

      That said getting gap4 DBs in gap5 is a good way to test the features (or lack of) :-)

      James

      PS. Latest changes since the test release have been to fix the "pack sequences" view of the editor so the cursor manipulation works. I've also come up with a way for the names panel to still be useful in this mode too, rather than simply displaying misleading data.

       
    • Giuseppe D'Auria

      Ok, thank you it worked I suppose fine,

      I work with 454 assemblies and from what I read, gap5 have important improvements about new hightroughput technologies.

      more problems...

      running tg_index following the README, or simply executing tg_index, I always have back the same error:

      tg_index: error while loading shared libraries: libtgap.so: cannot open shared object file: No such file or directory

      the file  libtgap.so is in the same directory of tg_index and reached by the path.

      I do not know what is wrong. I forgot to say that I am under Ubuntu 64bits

      thank you in advance

      Giuseppe

       
    • James Bonfield

      James Bonfield - 2009-04-09

      The libtgap.so should be in the lib/linux-x86-binaries subdirectory along with a whole load of other required libraries. You can add this manually to your LD_LIBRARY_PATH environment variable and it should find it.

      In theory the tg_index and tg_view programs are wrappers to set this up automatically and then run tg_index.bin and tg_view.bin in much the same way that the gap5 program is a wrapper to do this and run stash. It seems my last install broke that though and I didn't notice as my LD_LIBRARY_PATH includes those directories anyway.

      So either manually set LD_LIBRARY_PATH or replace tg_index with this script.

      James

      #!/bin/sh

      # Finds the directory holding this program
      find_dir() {
          arg0=$1

          # Protect against ls, sed and echo being exported shell functions.
          # Eg ls() { ls -F ${@+"$@"} }; export ls
          unset ls
          unset sed
          unset echo

          orig_dir=`pwd`
          must_loop=yes

          # The looping is to protect against symbolic links. We find the location
          # of arg0, but if arg0 is a link to elsewhere then we go around again
          # finding its location (noting that symlinks may be ether relative
          # or full pathnames).
          while [ -n "$must_loop" ]
          do
              cur_dir=`pwd`

              # Find directory that $arg0 resides in
              case $arg0 in
                  /*)
                      # Full pathname, not much to do
                      dir=`echo $arg0 | sed 's:/[^/]*$::'`
                      ;;
                  *)
                      # Relative pathname, add current directory.
                      dir=`echo $cur_dir/$arg0 | sed 's:/[^/]*$::'`
                      ;;
              esac

              if [ -h $arg0 ]
              then
                  # NOTE: This statement will not work when $arg0 is a filename
                  # containing "-> ".
                  lnto=`ls -l -- $arg0 | sed 's/.*-> //'`
                  lndir=`echo $lnto | sed 's:/[^/]*$::'`
                  case $lndir in
                      /*)
                          # Absolute symlink
                          dirto=$lndir
                          ;;
                      *)
                          # Relative symlink
                          dirto=`echo $arg0 | sed "s:/[^/]*\$:/$lndir:"`
                          ;;
                  esac

                  cd "$dirto"
                  arg0=`echo $lnto | sed 's:.*/::'`
                  must_loop=yes
              else
                  must_loop=
              fi
          done

          # To tidy up cases with ../ and ./ we cd to the directory, getcwd, and then
          # cd back again
          cd "$dir"
          dir=`pwd`
          cd "$orig_dir"

          echo $dir
      }

      STADENROOT=`find_dir $0`/..
      export STADENROOT
      STADEN_PREPEND=1 . $STADENROOT/staden.profile

      # Define TCL/TK config - not defined in staden.profile as it may break
      # some other applications the user wishes to use.
      TCL_LIBRARY=$STADLIB/tcl
      TK_LIBRARY=$STADLIB/tk
      export TCL_LIBRARY TK_LIBRARY

      #
      # Run it!
      #
      exec tg_index.bin ${@+"$@"}

       
    • James Bonfield

      James Bonfield - 2009-04-09

      Ugh, wish there were attachments on these forums. Well if it doesn't work let me know and I'll upload it to the patches area or similar.

       
    • Giuseppe D'Auria

      Ok, I changed tg_index whit the script you pasted here and it works perfectly.
      I was able to load my db (big 454 db whit Paired Ends)
      Now I start testing the program.....

      do you think this is the good forum to chat about the program?

      Giuseppe

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks