Header Leaderboard Ad

Collapse

how to use samtools to open my bam file

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
                  How RNA-Seq is Transforming Cancer Studies
                  by seqadmin



                  Cancer research has been transformed through numerous molecular techniques, with RNA sequencing (RNA-seq) playing a crucial role in understanding the complexity of the disease. Maša Ivin, Ph.D., Scientific Writer at Lexogen, and Yvonne Goepel Ph.D., Product Manager at Lexogen, remarked that “The high-throughput nature of RNA-seq allows for rapid profiling and deep exploration of the transcriptome.” They emphasized its indispensable role in cancer research, aiding in biomarker...
                  09-07-2023, 11:15 PM
                • seqadmin
                  Methods for Investigating the Transcriptome
                  by seqadmin




                  Ribonucleic acid (RNA) represents a range of diverse molecules that play a crucial role in many cellular processes. From serving as a protein template to regulating genes, the complex processes involving RNA make it a focal point of study for many scientists. This article will spotlight various methods scientists have developed to investigate different RNA subtypes and the broader transcriptome.

                  Whole Transcriptome RNA-seq
                  Whole transcriptome sequencing...
                  08-31-2023, 11:07 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by seqadmin, Today, 07:42 AM
                0 responses
                9 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 09-22-2023, 09:05 AM
                0 responses
                23 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 09-21-2023, 06:18 AM
                0 responses
                16 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 09-20-2023, 09:17 AM
                0 responses
                16 views
                0 likes
                Last Post seqadmin  
                Working...
                X