Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wangli
    Member
    • Apr 2012
    • 48

    #1

    how to use samtools to open my bam file

    I am a very beginner in using samtools.
    I tried "samtools view myfile.bam" in the desired directory. It didnot work.
    Thanks!
  • wangli
    Member
    • Apr 2012
    • 48

    #2
    samtools view -H INX730_D0AJWACXX_6_AAACAT.bam
    bash: samtools: command not found

    I installed samtools as suggestions here:

    wget http://sourceforge.net/projects/bio-...r.bz2/download
    wget http://sourceforge.net/projects/samt...r.bz2/download
    tar -jxf bwa-0.5.5.tar.bz2; tar -jxf samtools-0.1.7a.tar.bz2
    (cd bwa-0.5.5; make; cp bwa $HOME/bin)
    (cd samtools-0.1.7a; make; cp samtools misc/samtools.pl $HOME/bin)
    export PATH="$PATH:$HOME/bin" # this is bash only.

    when doing command as cp samtools misc/samtools.pl /usr/bin
    only samtools.pl can be copied.

    I appreciate any help. Thanks!

    Comment

    • dpryan
      Devon Ryan
      • Jul 2011
      • 3478

      #3
      Originally posted by wangli View Post
      samtools view -H INX730_D0AJWACXX_6_AAACAT.bam
      bash: samtools: command not found

      (cd samtools-0.1.7a; make; cp samtools misc/samtools.pl $HOME/bin)
      export PATH="$PATH:$HOME/bin" # this is bash only.

      when doing command as cp samtools misc/samtools.pl /usr/bin
      only samtools.pl can be copied.

      I appreciate any help. Thanks!
      If the samtools executable isn't copied properly, as you suggested, then that's probably the problem. If you get an error when you copy the executable then it'd be helpful if you provided it.

      Comment

      • wangli
        Member
        • Apr 2012
        • 48

        #4
        I go to the samtools-0.1.8 directory, and didnot find the executable "samtools", except a file named as samtools.1, which explains the usage of samtool command.
        My version is 0.1.8.
        I could not find the executable file.

        Comment

        • dpryan
          Devon Ryan
          • Jul 2011
          • 3478

          #5
          Then something borked during compilation. Type "make clean && make" (without the quotes) in that directory and post whatever error you eventually get. Of course, you could get lucky and it works properly in compiling the executable. In that case, copy it into your PATH and proceed with usage.

          Comment

          • wangli
            Member
            • Apr 2012
            • 48

            #6
            I go to the samtools-0.1.8 directory, and didnot find the executable "samtools", except a file named as samtools.1, which explains the usage of samtool command.
            My version is 0.1.8.
            I could not find the executable file.

            when I do make, I run into the following problems:
            bam_tview.c:5:20: error: curses.h: No such file or directory
            bam_tview.c:7:2: warning: #warning "_CURSES_LIB=1 but NCURSES_VERSION not defined; tview is NOT compiled"
            bam_tview.c:434:2: warning: #warning "No curses library is available; tview is disabled."
            make: *** [bam_tview.o] Error 1

            Thanks!

            Comment

            • dpryan
              Devon Ryan
              • Jul 2011
              • 3478

              #7
              Then either install ncurses or follow the INSTALL document:
              The text-based viewer (tview) requires the GNU ncurses library
              <http://www.gnu.org/software/ncurses/>, which comes with Mac OS X and most of
              the modern Linux/Unix distributions. If you do not have this library installed,
              you can still compile the rest of SAMtools by manually changing:
              `-D_CURSES_LIB=1' to `-D_CURSES_LIB=0' at the line starting with `DFLAGS=', and
              comment out the line starting with `LIBCURSES='.

              Comment

              • wangli
                Member
                • Apr 2012
                • 48

                #8
                Oh, great! Thanks a lot!
                I have make it.

                Comment

                Latest Articles

                Collapse

                • SEQadmin2
                  Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                  by SEQadmin2



                  Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                  Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                  ...
                  10-14-2026, 09:55 AM
                • SEQadmin2
                  New Genomics Technologies Take Aim at Long-Standing Limits
                  by SEQadmin2


                  Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                  We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                  ...
                  09-28-2026, 10:25 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by SEQadmin2, Yesterday, 11:13 AM
                0 responses
                21 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, Yesterday, 10:48 AM
                0 responses
                18 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 10-15-2026, 10:52 AM
                0 responses
                36 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 10-14-2026, 05:39 AM
                0 responses
                42 views
                0 reactions
                Last Post SEQadmin2  
                Working...