Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • k.devito
    Junior Member
    • Jul 2014
    • 4

    #1

    Samtools indexing problems

    Hi there!

    I'm still pretty new to bioinformatics and using programs in Terminal (MacOS 10.9) and have been struggling to get samtools indexing command to work for me. Using other guides I have successfully downloaded and unzipped the files, as well as accessing the samtools command list. I also have downloaded Xcode 5.1 as per other peoples suggestions.

    Ultimately I would like to index a .bam file from a URL (ending in /words.bam). As far as I know, this should work by entering:

    $ samtools index <file name here.bam>

    from the directory page. However, it keeps telling me:

    -bash: samtool: command not found

    Is it also possible to specify an output file to my desktop?

    I hope I have described the problem sufficiently. Help on the matter would be greatly appreciated!
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    I don't think samtools is able to index a remote file (which is what you seem to be trying to do) by issuing a local command. It can open a remote BAM file (and download the index from the same location) is how I read the quote from samtools manual page.

    Samtools is also able to open a BAM (not SAM) file on a remote FTP or HTTP server if the BAM file name starts with ‘ftp://’ or ‘http://’. Samtools checks the current working directory for the index file and will download the index upon absence.
    The other problem is "command not found" error. If you are in the directory where you see the samtools executable then do this

    Code:
    $ ./samtools your_command_here
    otherwise provide full path to samtools executable like so if you run it from a different directory

    Code:
    $ /full_path_to/samtools your_command_here

    Comment

    • k.devito
      Junior Member
      • Jul 2014
      • 4

      #3
      Thanks so much!
      The command is recognized! now I'm just waiting for the bam file to download (which is taking forever). But theoretically, once downloaded, and indexed I should be able to view it in IGV, correct? (This all started with the fact that IGV wouldn't recognized a bam file without an index, but theoretically if I have both files located on my Desktop, it will recognize the bai file as the index so long as it has the same name. I think I recall reading that somewhere, otherwise you can enter the pathway manually...).

      Thanks for your patience!

      Comment

      • GenoMax
        Senior Member
        • Feb 2008
        • 7142

        #4
        That is correct. You would want to make sure that you have the same "genome" available as was used for generating the BAM file. If it is one of the standard ones (e.g. hg19) included with IGV you are all set.

        Comment

        • k.devito
          Junior Member
          • Jul 2014
          • 4

          #5
          Success (finally)! Thanks again, GenoMax.

          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, 10-22-2026, 11:13 AM
          0 responses
          24 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-22-2026, 10:48 AM
          0 responses
          20 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-15-2026, 10:52 AM
          0 responses
          36 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-14-2026, 05:39 AM
          0 responses
          42 views
          0 reactions
          Last Post SEQadmin2  
          Working...