Unconfigured 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

                              • SEQadmin2
                                Cancer Drug Resistance: The Lingering Barrier to Rising Survival
                                by SEQadmin2



                                Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

                                There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
                                Today, 05:17 AM
                              • GATTACAT
                                Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                                by GATTACAT
                                Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                                07-01-2026, 11:43 AM
                              • SEQadmin2
                                Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                                by SEQadmin2


                                I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

                                Here are nine questions we think about, in roughly the order they matter, before...
                                06-18-2026, 07:11 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by SEQadmin2, Yesterday, 11:05 AM
                              0 responses
                              7 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 07-02-2026, 11:08 AM
                              0 responses
                              28 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-30-2026, 05:37 AM
                              0 responses
                              28 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-26-2026, 11:10 AM
                              0 responses
                              27 views
                              0 reactions
                              Last Post SEQadmin2  
                              Working...