Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • tabix error on Mac

    In the course of getting VCF tools running on Mac (OSX), I stumbled upon what appears to be a Mac-specific problem with tabix. The VCFtools merge-vcf perl script calls tabix <filename.vcf> -l . The '-l' option is not listed in the tabix manual document, but it is supposed to list the sequence names stored in the index of the bgzipped vcf file that gets created via 'tabix -p vcf <filename.vcf.gz>' . Whether running merge-vcf or running tabix directly on the bgzipped versions of the VCFtools example files (as well as on my own data), on a Mac I get the following error:

    '[main] invalid region: unknown target name or minus interval.'

    But, when I run the same exact commands on a Linux machine....everything works fine, no errors at all.

    No related posts to date as far as I can tell, but is anyone else aware of this issue, and is there any plan to correct it in the future?
    Adam H. Freedman
    Dept. of OEB, Harvard University

  • #2
    Try changing the perl script from calling this:

    tabix <filename.vcf> -l

    to call this instead:

    tabix -l <filename.vcf>

    Comment


    • #3
      thanks. didn't change the perl script yet, but, yes, running tabix -l <filename> on the command line instead of tabix <filename> -l solves the problem. very odd behavior on the Mac's part though...or perhaps it is more accurate to say better behavior on Linux's part.
      Adam H. Freedman
      Dept. of OEB, Harvard University

      Comment


      • #4
        Tabix parses its command line options with getopt(). On Linux, you get GNU getopt() which, as a convenient extension to the standard behaviour, accepts options intermixed with arguments such as filenames. On Mac OS, unless you take steps to compile tabix with GNU getopt() yourself, you get the standard behaviour -- which doesn't.

        Taking advantage of this non-portable extension is a wee bug in vcftools's Vcf.pm (and also vcf-isec), and I've pointed Petr at this thread, so hopefully it'll get fixed in svn soon. (And in the meantime, as maubp showed, it's not too hard to patch it yourself )

        -- John

        Comment


        • #5
          Originally posted by adamhfreedman View Post
          thanks. didn't change the perl script yet, but, yes, running tabix -l <filename> on the command line instead of tabix <filename> -l solves the problem. very odd behavior on the Mac's part though...or perhaps it is more accurate to say better behavior on Linux's part.
          Yes, this annoys me regularly (e.g. "ls *.py -l" has to be typed as "ls -l *.py"). This is a Mac OS X design choice that affects command line parsing [although there are workarounds, see John's post above].
          Last edited by maubp; 10-26-2010, 12:52 AM. Reason: Correction

          Comment

          Latest Articles

          Collapse

          • seqadmin
            Essential Discoveries and Tools in Epitranscriptomics
            by seqadmin


            The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist on Modified Bases...
            Yesterday, 07:01 AM
          • 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

          ad_right_rmr

          Collapse

          News

          Collapse

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