Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • junfeng
    Junior Member
    • Nov 2010
    • 5

    #1

    Cygwin Samtools

    Help need desperately! Recently I sent out samples for sequencing and was told will be given .bam files. I am trying to learn samtools to manipulate the .bam files. I am a totally newcomer to bioinformatics. I installed Cygwin in my 64 bit window 7. Then I followed the command on installing samtools. It looks successful. However, when i simply can not get it to work. Each time when i typed in the command samtools.view etc, i got the message that the no command can be found: bash:samtools:command not found. Can anybody tell how to get it to work
    Thanks
    JFW
  • Richard Finney
    Senior Member
    • Feb 2009
    • 701

    #2
    type

    export PATH=$PATH:/wherever/youput/samtoolsdir/

    to tell the shell (command line interpreter) where to look (this version adds to the current PATH ($PATH)).

    Note that "/wherever/youput/samtoolsdir/" is , of course, the directory that you put samtools in.

    Beware that you have to overcome the dreaded "/cygdrive" confusion in that you may have to prepend this curious string when specifying paths (aka directories).

    When in doubt, just use the full pathname, for example :

    /cygdrive/c/samtools-0.1.13/samtools index mysample.bam

    Type this

    find /cygdrive/c/ -name 'samtools'

    if you forgot where you put samtools. Note that the "/c" is the famous C-drive and you may have a different drive letter (e.g. d or e or z )
    Last edited by Richard Finney; 04-01-2011, 01:39 PM. Reason: cutfusionpastebad

    Comment

    • junfeng
      Junior Member
      • Nov 2010
      • 5

      #3
      Thank you very much for the quick reply.

      I entered the 'export PATH...'. However, it is still not working. Here is how I installed the samtools:

      1. The decompressed samtools files are in c:\cygwin\home\junfengwang\samtools-0.1.14
      2. While in the above directory, I typed in 'make' to compile samtools.
      3. Afterwards, I copied `samtools', `bcftools/bcftools' and other executables/scripts in `misc' to c:\cygwin\usr\local\bin;
      4. Finally I copied `samtools.1' and `bcftools/bcftools.1' to c:\cygwin\usr\man

      I noticed that all the executable files are perl program file. Also the path 'c:\cygwin\usr\local\bin' and 'c:\cygwin\usr\man' are in $PATH

      Have I done everything correctly?

      Thanks
      JFW

      Comment

      • Richard Finney
        Senior Member
        • Feb 2009
        • 701

        #4
        There is a perl program in samtools with a ".pl" extension but the samtools are mostly C programs. Perhaps in cygwin you have to add the ".exe" extension (I'm not sure). Try the fully qualified path.

        Comment

        • krobison
          Senior Member
          • Nov 2007
          • 734

          #5
          cygwin is full blown UNIX, so you don't need the .exe

          Try "which samtools" -- is it pointing to the correct place? As previous poster noted, the Perl tools are wrappers to extend functionality, but you need the samtools binary on your PATH

          Comment

          • RDW
            Member
            • Oct 2008
            • 63

            #6
            What happens when you just type:

            ./samtools

            when in the directory containing your samtools executable?

            How about?:

            ls -l samtools

            A Cygwin executable may have an .exe extension, but it shouldn't be necessary to specify it explicity ('./samtools' should work even if the file is named 'samtools.exe').

            Have you tried the pre-built Win32 executable? The Samtools site has one for version 0.1.12 (2 versions older than current, from last December).

            Have you considered running this stuff under Linux? Even if you don't want to dual-boot, setting up Linux under VirtualBox isn't much more complicated than setting up Cygwin (and building from source may be less problematic). Note also that you can only compile 32-bit executables under Cygwin, which could be a problem with larger .bam files. You can run a 64-bit Linux distribution even under VirtualBox on Win64, though for production use you'd want to run Linux natively.

            Comment

            • junfeng
              Junior Member
              • Nov 2010
              • 5

              #7
              Thank you all for the kind suggestions. At present, I am with my kids during their spring-break and have not had anytime to work on the Cygwin samtools. I am actually is using Window 7 (64 bits) on which I installed Cygwin. It could be that I used a wrong version of Samtools. I am planning to try next week after the spring-break
              Best regards
              JFW

              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, 10:52 AM
              0 responses
              9 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-14-2026, 05:39 AM
              0 responses
              19 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-13-2026, 09:56 AM
              0 responses
              16 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-09-2026, 11:14 AM
              0 responses
              27 views
              0 reactions
              Last Post SEQadmin2  
              Working...