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
                                Best Practices for Single-Cell Sequencing Analysis
                                by seqadmin



                                While isolating and preparing single cells for sequencing was historically the bottleneck, recent technological advancements have shifted the challenge to data analysis. This highlights the rapidly evolving nature of single-cell sequencing. The inherent complexity of single-cell analysis has intensified with the surge in data volume and the incorporation of diverse and more complex datasets. This article explores the challenges in analysis, examines common pitfalls, offers...
                                06-06-2024, 07:15 AM
                              • seqadmin
                                Latest Developments in Precision Medicine
                                by seqadmin



                                Technological advances have led to drastic improvements in the field of precision medicine, enabling more personalized approaches to treatment. This article explores four leading groups that are overcoming many of the challenges of genomic profiling and precision medicine through their innovative platforms and technologies.

                                Somatic Genomics
                                “We have such a tremendous amount of genetic diversity that exists within each of us, and not just between us as individuals,”...
                                05-24-2024, 01:16 PM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by seqadmin, 06-17-2024, 06:54 AM
                              0 responses
                              10 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 06-14-2024, 07:24 AM
                              0 responses
                              20 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 06-13-2024, 08:58 AM
                              0 responses
                              17 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 06-12-2024, 02:20 PM
                              0 responses
                              20 views
                              0 likes
                              Last Post seqadmin  
                              Working...
                              X