Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Azazel
    Member
    • Oct 2010
    • 52

    #1

    [bedtools][fastaFrombed] could not stat file

    I have a fasta file rn4.fa with the rat genome and also a fai file rn4.fa.fai which I generated with samtools faidx. I want to extract fasta from bed like this (below), but I get an error message "could not stat file".

    Code:
    fastaFromBed -name -fi ../rn4/rn4.fa -bed foo.bed -fo bar.fa
    could not stat file../rn4/rn4.fa
    I am using fastaFromBed Version: v2.16.1

    I am pretty much stuck here - anything I can do to get fastaFromBed working?

    Thanks!
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    Are you using the command correctly?
    Code:
    getFastaFromBed OR bedtools getfasta
    Manual here: http://bedtools.readthedocs.org/en/l.../getfasta.html

    Another thing is to verify that the file in question is actually present at the relative path (../rn4/rn4.fa).
    Last edited by GenoMax; 06-26-2013, 03:12 AM.

    Comment

    • Azazel
      Member
      • Oct 2010
      • 52

      #3
      Originally posted by GenoMax View Post
      Are you using the command correctly?
      Code:
      getFastaFromBed OR bedtools getfasta
      Manual here: http://bedtools.readthedocs.org/en/l.../getfasta.html

      Another thing is to verify that the file in question is actually present at the relative path (../rn4/rn4.fa).
      These three commands all give me exactly the same error message (as described above):

      Code:
      fastaFromBed -name -fi ../rn4/rn4.fa -bed foo.bed -fo bar.fa
      getFastaFromBed -name -fi ../rn4/rn4.fa -bed foo.bed -fo bar.fa
      bedtools getfasta -name -fi ../rn4/rn4.fa -bed foo.bed -fo bar.fa
      Yes, the file definitely exists at the relative path:

      Code:
      user@machine-VirtualBox:~/clover$ file ../rn4/rn4.fa
      ../rn4/rn4.fa: ASCII text
      One thing I note is that the error message, as descibed in my original post, is:
      Code:
      could not stat file../rn4/rn4.fa
      There is no space between the string "could not stat file" and the path/file - could this mean something?
      Last edited by Azazel; 06-26-2013, 06:56 AM. Reason: typos

      Comment

      • GenoMax
        Senior Member
        • Feb 2008
        • 7142

        #4
        I wonder if the error is related to virtual server (looking at your system prompt). Are those file paths local to the VM? What OS are you running in the VM?

        Comment

        • Azazel
          Member
          • Oct 2010
          • 52

          #5
          Originally posted by GenoMax View Post
          I wonder if the error is related to virtual server (looking at your system prompt). Are those file paths local to the VM? What OS are you running in the VM?
          I am running Xubuntu inside Virtual Box, with Windows 7 as host. Everything is inside VB/Xubuntu, so I don't see how this could affect antyhing.

          "file paths local to the VM": sorry, I don not understand what you mean by this at all. The file paths are relative to root (/), inside Xubuntu.

          Comment

          • GenoMax
            Senior Member
            • Feb 2008
            • 7142

            #6
            Originally posted by Azazel View Post
            I am running Xubuntu inside Virtual Box, with Windows 7 as host. Everything is inside VB/Xubuntu, so I don't see how this could affect antyhing.

            "file paths local to the VM": sorry, I don not understand what you mean by this at all. The file paths are relative to root (/), inside Xubuntu.
            Since there does not seem to be a logical explanation to what you are seeing I was merely expressing a possibility that this error may be somehow related to the fact that you are running this in a VM.

            "file paths" referred to a possibility that your local PC file system may be auto-mounted and visible in your VM.

            Comment

            • Azazel
              Member
              • Oct 2010
              • 52

              #7
              Originally posted by GenoMax View Post
              Since there does not seem to be a logical explanation to what you are seeing I was merely expressing a possibility that this error may be somehow related to the fact that you are running this in a VM.

              "file paths" referred to a possibility that your local PC file system may be auto-mounted and visible in your VM.
              Now I understand. No, I don't think this is the reason because I am not mounting anything external, and the file is definitely there when I use the "file" command, open it in an editor etc.

              The same error "could not stat" also appears when the rn4.fa and rn4.fa.fai files are in the very same directory from where the command is run, not using relative pathnames.

              "there does not seem to be a logical explanation": one logical, obvious explanation is that there could be a bug in bedtools v2.16.1.

              Has anyone who uses bedtools v2.16.1 encountered the "could not stat file" error message? Do you know how to fix this? Any help specific to this problem would be much appreciated - thanks!

              Comment

              • GenoMax
                Senior Member
                • Feb 2008
                • 7142

                #8
                Current version of bedtools is 2.17.0. If that still does not work then consider contacting Aaron Quinlan, the developer of Bedtools.

                One more thing. Have you allocated enough RAM to the VM and are you using 64-bit Xubuntu in the VM?

                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
                10 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
                17 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...