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
                  Exploring the Dynamics of the Tumor Microenvironment
                  by seqadmin




                  The complexity of cancer is clearly demonstrated in the diverse ecosystem of the tumor microenvironment (TME). The TME is made up of numerous cell types and its development begins with the changes that happen during oncogenesis. “Genomic mutations, copy number changes, epigenetic alterations, and alternative gene expression occur to varying degrees within the affected tumor cells,” explained Andrea O’Hara, Ph.D., Strategic Technical Specialist at Azenta. “As...
                  07-08-2024, 03:19 PM
                • seqadmin
                  Exploring Human Diversity Through Large-Scale Omics
                  by seqadmin


                  In 2003, researchers from the Human Genome Project (HGP) announced the most comprehensive genome to date1. Although the genome wasn’t fully completed until nearly 20 years later2, numerous large-scale projects, such as the International HapMap Project and 1000 Genomes Project, continued the HGP's work, capturing extensive variation and genomic diversity within humans. Recently, newer initiatives have significantly increased in scale and expanded beyond genomics, offering a more detailed...
                  06-25-2024, 06:43 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by seqadmin, Yesterday, 07:20 AM
                0 responses
                21 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 07-16-2024, 05:49 AM
                0 responses
                37 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 07-15-2024, 06:53 AM
                0 responses
                40 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 07-10-2024, 07:30 AM
                0 responses
                41 views
                0 likes
                Last Post seqadmin  
                Working...
                X