Seqanswers Leaderboard Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • louis7781x
    Member
    • Oct 2010
    • 74

    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
  • chenyao
    Member
    • Jul 2011
    • 74

    #2
    same problem

    Dear louis,

    I am the same problem,

    Did you fix it?

    Comment

    • Hunny
      Member
      • Apr 2011
      • 23

      #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

      • ahmetz
        Member
        • Jun 2011
        • 23

        #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

        • louis7781x
          Member
          • Oct 2010
          • 74

          #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

          • chenyao
            Member
            • Jul 2011
            • 74

            #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

            • louis7781x
              Member
              • Oct 2010
              • 74

              #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

              • chenyao
                Member
                • Jul 2011
                • 74

                #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

                • chenyao
                  Member
                  • Jul 2011
                  • 74

                  #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

                  • louis7781x
                    Member
                    • Oct 2010
                    • 74

                    #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

                    • chenyao
                      Member
                      • Jul 2011
                      • 74

                      #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

                      • DZhang
                        Senior Member
                        • Jun 2010
                        • 177

                        #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

                        • chenyao
                          Member
                          • Jul 2011
                          • 74

                          #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

                          • DZhang
                            Senior Member
                            • Jun 2010
                            • 177

                            #14
                            cp /your_directory/* /your_path/.

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

                            Comment

                            • Michael.James.Clark
                              Senior Member
                              • Apr 2009
                              • 207

                              #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
                                Pathogen Surveillance with Advanced Genomic Tools
                                by seqadmin




                                The COVID-19 pandemic highlighted the need for proactive pathogen surveillance systems. As ongoing threats like avian influenza and newly emerging infections continue to pose risks, researchers are working to improve how quickly and accurately pathogens can be identified and tracked. In a recent SEQanswers webinar, two experts discussed how next-generation sequencing (NGS) and machine learning are shaping efforts to monitor viral variation and trace the origins of infectious...
                                03-24-2025, 11:48 AM
                              • seqadmin
                                New Genomics Tools and Methods Shared at AGBT 2025
                                by seqadmin


                                This year’s Advances in Genome Biology and Technology (AGBT) General Meeting commemorated the 25th anniversary of the event at its original venue on Marco Island, Florida. While this year’s event didn’t include high-profile musical performances, the industry announcements and cutting-edge research still drew the attention of leading scientists.

                                The Headliner
                                The biggest announcement was Roche stepping back into the sequencing platform market. In the years since...
                                03-03-2025, 01:39 PM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by seqadmin, 03-20-2025, 05:03 AM
                              0 responses
                              42 views
                              0 reactions
                              Last Post seqadmin  
                              Started by seqadmin, 03-19-2025, 07:27 AM
                              0 responses
                              53 views
                              0 reactions
                              Last Post seqadmin  
                              Started by seqadmin, 03-18-2025, 12:50 PM
                              0 responses
                              38 views
                              0 reactions
                              Last Post seqadmin  
                              Started by seqadmin, 03-03-2025, 01:15 PM
                              0 responses
                              194 views
                              0 reactions
                              Last Post seqadmin  
                              Working...