Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to place samtools in "PATH" for use with TopHat on MAC

    Hi everyone

    Now I have installed tophat on mac64bit,but I have some question.

    I download tophat-1.31 Mac OS X x86_64 binary,and it doesn't need to compile.


    The following is maual of tophat
    You will also need the samtools program in your PATH, and if you plan to compile Tophat from source you should also install the SAM tools package, by following these steps:
    Download the SAM tools
    Unpack the SAM tools tarball and cd to the SAM tools source directory.
    Build the SAM tools by typing make at the command line.
    Choose a directory into which you wish to copy the SAM tools binary, the included library libbam.a, and the library headers. A common choice is /usr/local/.
    Copy libbam.a to the lib/ directory in the folder you've chosen above (e.g. /usr/local/lib/)
    Create a directory called "bam" in the include/ directory (e.g. /usr/local/include/bam)
    Copy the headers (files ending in .h) to the include/bam directory you've created above (e.g. /usr/local/include/bam)
    Copy the samtools binary to some directory in your PATH.
    To install TopHat, unpack the tarball and change to the package directory as follows:
    tar zxvf tophat-1.2.0.tar.gz
    cd tophat-1.2.0/
    Now build the package:
    ./configure --prefix=/path/to/install/directory/
    Note: If you copied the SAM tools library and header files to someplace other than /usr/local/, you may need to supply the --with-bam configuration option. For example, if you placed the libbam.a files in /opt/biotools/lib/ and SAM tools .h files in /opt/biotools/include/bam/ then the configure command will become something like this:
    ./configure --prefix=/opt/biotools --with-bam=/opt/biotools
    (in this example tophat and its modules will be installed in /opt/biotools/bin/ directory)
    After the configure script finishes successfully, build the Tophat package:
    make
    Finally, install TopHat:
    make install
    This will install tophat and its modules into /path/to/install/directory/bin directory. You may want to add that directory to your shell's PATH if it's not there already.
    My question is tophat 64 bit doesn't need to compile.

    How do I ./configure --prefix=..../../.

    And when I run tophat,it shows the error

    [Wed Jul 13 16:28:25 2011] Beginning TopHat run (v1.3.1)
    -----------------------------------------------
    [Wed Jul 13 16:28:25 2011] Preparing output location ./tophat_out/
    [Wed Jul 13 16:28:25 2011] Checking for Bowtie index files
    [Wed Jul 13 16:28:25 2011] Checking for reference FASTA file
    [Wed Jul 13 16:28:25 2011] Checking for Bowtie
    Bowtie version: 0.12.7.0
    [Wed Jul 13 16:28:25 2011] Checking for Samtools
    Error locating program: samtools
    If anyone know how to solve

    Please tell me.

    Thanks

  • #2
    same problem

    Dear louis,

    I am the same problem,

    Did you fix it?

    Comment


    • #3
      Originally posted by chenyao View Post
      Dear louis,

      I am the same problem,

      Did you fix it?
      I guess you need to export the path of samtools to your shell PATH, just using a command like
      $ export PATH=/your_samtools_directory/:$PATH

      or you can insert the command above in your .bash_profile or .bashrc in you home directory.

      Hope it would help you.

      Cheers,

      Comment


      • #4
        you need to cop tophat - the precompiled version - into the same folder where your samtools are. and then put that folder in your path as hunny described. it should work after that

        Comment


        • #5
          Originally posted by Hunny View Post
          I guess you need to export the path of samtools to your shell PATH, just using a command like
          $ export PATH=/your_samtools_directory/:$PATH

          or you can insert the command above in your .bash_profile or .bashrc in you home directory.

          Hope it would help you.

          Cheers,
          That's right export your path in .profile(In mac,use .profile;in linux use .bash_profile or .bashrc)

          and relogin,keyin echo $PATH

          see PATH wheather insert in your system

          Comment


          • #6
            Still

            Dear all,

            Thank you for your reply.

            I still have the same problem:

            I export the path as you said:

            root@ubuntu:/home/lenovo/# export PATH=/home/lenovo/samtools-0.1.17:$PATH
            root@ubuntu:/home/lenovo/# echo $PATH
            /home/lenovo/samtools-0.1.17:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin

            It seems samtools have been added to the PATH, but when I use tophat:

            root@ubuntu:/home/lenovo/test_data# tophat -r 20 test_ref reads_1.fq reads_2.fq

            [Sat Jul 23 13:13:13 2011] Beginning TopHat run (v1.3.1)
            -----------------------------------------------
            [Sat Jul 23 13:13:13 2011] Preparing output location ./tophat_out/
            [Sat Jul 23 13:13:13 2011] Checking for Bowtie index files
            [Sat Jul 23 13:13:13 2011] Checking for reference FASTA file
            [Sat Jul 23 13:13:13 2011] Checking for Bowtie
            Bowtie version: 0.12.7.0
            [Sat Jul 23 13:13:13 2011] Checking for Samtools
            Samtools Version: 0.1.17
            [Sat Jul 23 13:13:13 2011] Generating SAM header for test_ref
            [Sat Jul 23 13:13:13 2011] Preparing reads
            format: fastq
            quality scale: phred33 (default)
            Error locating program: prep_reads
            -------------------------------------------------------------------------

            Who can help me?

            Comment


            • #7
              Originally posted by chenyao View Post
              Dear all,

              Thank you for your reply.

              I still have the same problem:

              I export the path as you said:

              root@ubuntu:/home/lenovo/# export PATH=/home/lenovo/samtools-0.1.17:$PATH
              root@ubuntu:/home/lenovo/# echo $PATH
              /home/lenovo/samtools-0.1.17:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin

              It seems samtools have been added to the PATH, but when I use tophat:

              root@ubuntu:/home/lenovo/test_data# tophat -r 20 test_ref reads_1.fq reads_2.fq

              [Sat Jul 23 13:13:13 2011] Beginning TopHat run (v1.3.1)
              -----------------------------------------------
              [Sat Jul 23 13:13:13 2011] Preparing output location ./tophat_out/
              [Sat Jul 23 13:13:13 2011] Checking for Bowtie index files
              [Sat Jul 23 13:13:13 2011] Checking for reference FASTA file
              [Sat Jul 23 13:13:13 2011] Checking for Bowtie
              Bowtie version: 0.12.7.0
              [Sat Jul 23 13:13:13 2011] Checking for Samtools
              Samtools Version: 0.1.17
              [Sat Jul 23 13:13:13 2011] Generating SAM header for test_ref
              [Sat Jul 23 13:13:13 2011] Preparing reads
              format: fastq
              quality scale: phred33 (default)
              Error locating program: prep_reads
              -------------------------------------------------------------------------

              Who can help me?
              Go the this page

              Discussion of next-gen sequencing related bioinformatics: resources, algorithms, open source efforts, etc


              or

              Discussion of next-gen sequencing related bioinformatics: resources, algorithms, open source efforts, etc


              maybe useful for u

              Comment


              • #8
                Dear louis, thank you, the problem is fixed. The same as you said, but only one thing different that I should add the tophat to the PATH, "This will install tophat and its modules into /path/to/install/directory/bin directory. You may want to add that directory to your shell's PATH if it's not there already"

                Comment


                • #9
                  But there is
                  Anther problem, I use the "export..." command, but every time I open terminal, I have to type this command again to run "TOPHAT". I tried to add this command to .bash_profile or .bashrc, but I can not find this file in home directory.

                  Comment


                  • #10
                    Originally posted by chenyao View Post
                    But there is
                    Anther problem, I use the "export..." command, but every time I open terminal, I have to type this command again to run "TOPHAT". I tried to add this command to .bash_profile or .bashrc, but I can not find this file in home directory.
                    you can create .bascrc by yourself! and for example, put in /home/chenyao/bin/.bashrc

                    Comment


                    • #11
                      Dear louis, I found your method is still a temporary solution. Although I write the command into ".bashrc" file in /home/yaochen, after I shutdown the terminal, the PATH returned to the original set.

                      Comment


                      • #12
                        Hi,

                        Tophat has associated executables, (e.g., prep_reads). When you uncompress the binary archive, there are quite a few executables in addition to tophat. You need to copy ALL of them to your path. In Post #6, the program was not complaining about samtools but missing prep_reads in your path.

                        Hope this helps.

                        Douglas

                        Comment


                        • #13
                          Originally posted by DZhang View Post
                          Hi,

                          Tophat has associated executables, (e.g., prep_reads). When you uncompress the binary archive, there are quite a few executables in addition to tophat. You need to copy ALL of them to your path. In Post #6, the program was not complaining about samtools but missing prep_reads in your path.

                          Hope this helps.

                          Douglas
                          www.contigexpress.com
                          Dear Zhang , it fixed the problem, thank you very much!
                          Still, I have another question , as I need to copy the execuatable files in the PATH, I wonder if there some comman which can copy all the files in a directory. I know "cp -r" command, but it copy the directory not all the files within this directory.

                          Comment


                          • #14
                            cp /your_directory/* /your_path/.

                            * or any wild card is important here in the command.

                            Comment


                            • #15
                              Originally posted by chenyao View Post
                              But there is
                              Anther problem, I use the "export..." command, but every time I open terminal, I have to type this command again to run "TOPHAT". I tried to add this command to .bash_profile or .bashrc, but I can not find this file in home directory.
                              Copy .bash_profile/.bashrc to ~/
                              Mendelian Disorder: A blogshare of random useful information for general public consumption. [Blog]
                              Breakway: A Program to Identify Structural Variations in Genomic Data [Website] [Forum Post]
                              Projects: U87MG whole genome sequence [Website] [Paper]

                              Comment

                              Latest Articles

                              Collapse

                              • seqadmin
                                Strategies for Sequencing Challenging Samples
                                by seqadmin


                                Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                                03-22-2024, 06:39 AM
                              • seqadmin
                                Techniques and Challenges in Conservation Genomics
                                by seqadmin



                                The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                                Avian Conservation
                                Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                                03-08-2024, 10:41 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by seqadmin, Yesterday, 06:37 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, Yesterday, 06:07 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 03-22-2024, 10:03 AM
                              0 responses
                              49 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 03-21-2024, 07:32 AM
                              0 responses
                              66 views
                              0 likes
                              Last Post seqadmin  
                              Working...
                              X