Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Samtools Mac Install

    I'm new to Unix and starting in a Bioinformatics Lab

    I recently got some .bam files from a collaborator and am trying
    to get samtools running on my Macbook Pro.

    I downloaded the samtools-0.1.7_i386-darwin.tar.bz2 file from their
    site and extracted it to the desktop. So far I've been unsuccessful in
    my efforts to get the program running in Terminal from this point.

    Can anyone help point me in the right direction?

    Thanks

  • #2
    I prefer to compile on my own, nevertheless you should be able to run this

    Code:
    ~/Deskop/samtoolsXXXX/samtools
    where samtoolsXXXX is the directory containing the samtools executable...
    Can you post the error you get?

    d

    Comment


    • #3
      When I enter that code, I get a summary of the program information:

      Program: samtools (Tools for alignments in the SAM format)
      Version: 0.1.7-6 (r530)

      Usage: samtools <command> [options]

      Command: view SAM<->BAM conversion
      sort sort alignment file
      pileup generate pileup output
      faidx index/extract FASTA
      tview text alignment viewer
      index index alignment
      fixmate fix mate information
      glfview print GLFv3 file
      flagstat simple stats
      calmd recalculate MD/NM tags and '=' bases
      merge merge sorted alignments
      rmdup remove PCR duplicates

      But when I try to add samtools commands, like "samtools view XXXX.bam" i get:

      open: No such file or directory
      [main_samview] fail to open file for reading.

      Comment


      • #4
        Originally posted by jlc_1020 View Post
        When I enter that code, I get a summary of the program information:

        Program: samtools (Tools for alignments in the SAM format)
        Version: 0.1.7-6 (r530)

        Usage: samtools <command> [options]

        Command: view SAM<->BAM conversion
        sort sort alignment file
        pileup generate pileup output
        faidx index/extract FASTA
        tview text alignment viewer
        index index alignment
        fixmate fix mate information
        glfview print GLFv3 file
        flagstat simple stats
        calmd recalculate MD/NM tags and '=' bases
        merge merge sorted alignments
        rmdup remove PCR duplicates

        But when I try to add samtools commands, like "samtools view XXXX.bam" i get:

        open: No such file or directory
        [main_samview] fail to open file for reading.
        Run this cmds and post the results here:

        $ pwd
        $ which samtools
        $ ls -lac my_bam
        $ samtools view my_bam
        -drd

        Comment


        • #5
          Originally posted by drio View Post
          Run this cmds and post the results here:

          $ pwd
          $ which samtools
          $ ls -lac my_bam
          $ samtools view my_bam
          I entered those commands in the directory that contains the samtools executable file and this is what I get:

          jlc-macbook-pro:samtools jlc$ pwd
          /Users/jlc/desktop/samtools
          jlc-macbook-pro:samtools jlc$ which\ samtools
          -bash: which samtools: command not found
          jlc-macbook-pro:samtools jlc$ ls -lac my.bam
          -rw-r--r--@ 1 jlc staff 1537771973 Mar 9 09:47 my.bam
          jlc-macbook-pro:samtools jlc$ samtools view my.bam
          -bash: samtools: command not found

          If I back up one directory and enter in the view command I get:

          jlc-macbook-pro:desktop jlc$ samtools/samtools view my.bam
          open: No such file or directory
          [main_samview] fail to open file for reading.

          Comment


          • #6
            Umm.. try:

            $ /Users/jlc/desktop/samtools/samtools view /Users/jlc/desktop/samtools/my.bam

            And get a Unix book
            -drd

            Comment


            • #7
              Originally posted by drio View Post
              Umm.. try:

              $ /Users/jlc/desktop/samtools/samtools view /Users/jlc/desktop/samtools/my.bam

              And get a Unix book
              Same error message:

              open: No such file or directory
              [main_samview] fail to open file for reading.

              Thanks though

              Comment


              • #8
                From the samtools directory, try:

                Code:
                ./samtools view my.bam

                Comment


                • #9
                  I figured it out. It was a problem with the directory where my files were located. I moved them to a new directory and it worked fine.

                  Comment


                  • #10
                    using samtools with mac

                    could you post the directory that you installed samtools into in order to get it to work? I have this problem too.

                    Comment


                    • #11
                      quick tip for mac users, if you drag a file into a terminal window the full path will appear.

                      It does not matter where you install samtools, you just need to provide the correct path to the executable, and the input files.

                      Comment


                      • #12
                        I installed samtools in a folder on the desktop and then put my files in the home folder so I wouldn't have to specify a path to them (since terminal is automatically in the home folder when it opens). To run, I used:

                        desktop/samtools/samtools view myfile.bam

                        Comment


                        • #13
                          Any one can suggest me about below problem

                          USER-no-MacBook-Pro-4:bowtie2-2.1.0 user$ samtools mpileup -uf example/reference/lambda_virus.fa eg2.sorted.bam | bcftools view -bvcg - > eg2.raw.bcf
                          [fai_load] build FASTA index.
                          -bash: bcftools: command not found
                          [mpileup] 1 samples in 1 input files
                          <mpileup> Set max per-file depth to 8000

                          Thank you very much

                          Comment


                          • #14
                            If you built samtools on this computer then "bcftools" program is generally present in its own directory (also called "bcftools" btw). You can either add these directories to your $PATH or provide the full path to the bcftools executable in your command line.

                            Comment


                            • #15
                              i provided full path of bcftools as bellowing

                              USER-no-MacBook-Pro-4:bowtie2-2.1.0 user$ samtools mpileup -uf example/reference/lambda_virus.fa eg2.sorted.bam | User/user/tan_analysis/samtools-0.1.19/bcftools view -bvcg - > eg2.raw.bcf
                              -bash: User/user/tan_analysis/samtools-0.1.19/bcftools: No such file or directory
                              [mpileup] 1 samples in 1 input files
                              <mpileup> Set max per-file depth to 8000

                              but the same problem i got.
                              Please give suggestion
                              Thank you

                              Comment

                              Latest Articles

                              Collapse

                              • seqadmin
                                Genetic Variation in Immunogenetics and Antibody Diversity
                                by seqadmin



                                The field of immunogenetics explores how genetic variations influence immune responses and susceptibility to disease. In a recent SEQanswers webinar, Oscar Rodriguez, Ph.D., Postdoctoral Researcher at the University of Louisville, and Ruben Martínez Barricarte, Ph.D., Assistant Professor of Medicine at Vanderbilt University, shared recent advancements in immunogenetics. This article discusses their research on genetic variation in antibody loci, antibody production processes,...
                                11-06-2024, 07:24 PM
                              • seqadmin
                                Choosing Between NGS and qPCR
                                by seqadmin



                                Next-generation sequencing (NGS) and quantitative polymerase chain reaction (qPCR) are essential techniques for investigating the genome, transcriptome, and epigenome. In many cases, choosing the appropriate technique is straightforward, but in others, it can be more challenging to determine the most effective option. A simple distinction is that smaller, more focused projects are typically better suited for qPCR, while larger, more complex datasets benefit from NGS. However,...
                                10-18-2024, 07:11 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by seqadmin, Today, 11:09 AM
                              0 responses
                              22 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, Today, 06:13 AM
                              0 responses
                              20 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 11-01-2024, 06:09 AM
                              0 responses
                              30 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 10-30-2024, 05:31 AM
                              0 responses
                              21 views
                              0 likes
                              Last Post seqadmin  
                              Working...
                              X