Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • 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!

  • #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


    • #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


      • #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


        • #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


          • #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


            • #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


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

                Comment

                Latest Articles

                Collapse

                • seqadmin
                  Strategies for Sequencing Challenging Samples
                  by seqadmin


                  Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                  03-22-2024, 06:39 AM
                • seqadmin
                  Techniques and Challenges in Conservation Genomics
                  by seqadmin



                  The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                  Avian Conservation
                  Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                  03-08-2024, 10:41 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by seqadmin, Yesterday, 06:37 PM
                0 responses
                12 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, Yesterday, 06:07 PM
                0 responses
                10 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 03-22-2024, 10:03 AM
                0 responses
                51 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 03-21-2024, 07:32 AM
                0 responses
                68 views
                0 likes
                Last Post seqadmin  
                Working...
                X