Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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!

  • #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


    • #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


      • #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


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

          Comment

          Latest Articles

          Collapse

          • seqadmin
            Current Approaches to Protein Sequencing
            by seqadmin


            Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
            04-04-2024, 04:25 PM
          • seqadmin
            Strategies for Sequencing Challenging Samples
            by seqadmin


            Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
            03-22-2024, 06:39 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, 04-11-2024, 12:08 PM
          0 responses
          27 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 10:19 PM
          0 responses
          31 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 09:21 AM
          0 responses
          27 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-04-2024, 09:00 AM
          0 responses
          52 views
          0 likes
          Last Post seqadmin  
          Working...
          X