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

              • kinpict.com
                Reply to 16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
                by kinpict.com
                The part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
                Today, 06:37 PM
              • SEQadmin2
                16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
                by SEQadmin2





                NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
                10-30-2026, 06:46 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, 11-12-2026, 07:59 AM
              0 responses
              27 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 11-05-2026, 09:25 AM
              0 responses
              35 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 11-03-2026, 11:54 AM
              2 responses
              56 views
              0 reactions
              Last Post kinpict.com  
              Started by SEQadmin2, 10-28-2026, 09:57 AM
              0 responses
              175 views
              0 reactions
              Last Post SEQadmin2  
              Working...