Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Bfast Fatal Error during indexing

    Hi,

    I am trying to index a fastafile with the human genome (build GRCh37, only chromosomes + MT) using bfast. In color space.
    I am using version 0.6.4f. As a guildeline I use secion 8.1.2 from the manual.

    Converting the reads to fastq and making both the color space and letter space brg files work without any trouble.

    However when I want to make the indexes the program grinds to a halt.

    The command I use:

    Code:
    bfast index -f human.fasta -m 1111111111111111111111 -w 14 -i 1 -A 1 -T /tmp/
    So human.fasta is my reference genome. and the files human.fasta.cs.brg and human.fasta.nt.brg have been generated.

    The output:

    Code:
    ************************************************************
    Checking input parameters supplied by the user ...
    Validating fastaFileName human.fasta.
    Validating tmpDir path /tmp/.
    Input arguments look good!
    ************************************************************
    ************************************************************
    Printing Program Parameters:
    programMode:                            [ExecuteProgram]
    fastaFileName:                          human.fasta
    space:                                  [Color Space]
    mask:                                   1111111111111111111111
    depth:                                  0
    hashWidth:                              14
    indexNumber:                            1
    repeatMasker:                           [Not Using]
    startContig:                            0
    startPos:                               0
    endContig:                              2147483647
    endPos:                                 2147483647
    exonsFileName:                          [Not Using]
    numThreads:                             4
    tmpDir:                                 /tmp/
    timing:                                 [Not Using]
    ************************************************************
    ************************************************************
    Reading in reference genome from human.fasta.cs.brg.
    In total read 25 contigs for a total of 3095693983 bases
    ************************************************************
    Creating the index...
    ************************************************************
    Warning: startContig was less than zero.
    Defaulting to contig=1 and position=1.
    ************************************************************
    ************************************************************
    Warning: endContig was greater than the number of contigs in the reference genome.
    Defaulting to reference genome's end contig=25 and position=16571.
    ************************************************************
    Currently on [contig,pos]:
    [------25,------16571]
    Sorting by thread...                                                                                                                                        
    100.000 percent complete************************************************************
    In function "RGIndexMergeHelperFromDiskContig_8": Fatal Error[ReadFileError]. Message: Could not read in tmp lower.
    The file stream error was:: Bad file descriptor
     ***** Exiting due to errors *****
    ************************************************************
    So it works, but as soon when the index should be written to disk it fails. THis happens after around 24 hours.

    I have tried to check if something is wrong with the harddisk, an no fsck dont gives any problems. And I can create a large file with other programs.

    The output file human.fasta.cs.1.1.bif is generated, however has zero length.

  • #2
    In "configure.ac" in the source directory, try changing the following line
    Code:
    extended_CFLAGS="";# "-m64 -D_FILE_OFFSET_BITS=64";
    to
    Code:
    extended_CFLAGS="-m64 -D_FILE_OFFSET_BITS=64";
    You then probably need to re-run "bfast fasta2brg".

    Comment


    • #3
      Thanks for the reply.
      I changed the configuration file and recompiled the source.

      Unoftunately it did not help. still getting the following error:

      Code:
      Sorting...                                                                                                                                              100.000 percent complete************************************************************
      In function "RGIndexMergeHelperFromDiskContig_8": Fatal Error[ReadFileError]. Message: Could not read in tmp lower.
      The file stream error was:: Bad file descriptor
       ***** Exiting due to errors *****
      ************************************************************

      Comment


      • #4
        Originally posted by fpruzius View Post
        Thanks for the reply.
        I changed the configuration file and recompiled the source.

        Unoftunately it did not help. still getting the following error:

        Code:
        Sorting...                                                                                                                                              100.000 percent complete************************************************************
        In function "RGIndexMergeHelperFromDiskContig_8": Fatal Error[ReadFileError]. Message: Could not read in tmp lower.
        The file stream error was:: Bad file descriptor
         ***** Exiting due to errors *****
        ************************************************************
        I can't replicate your error, so unfortunately I cannot debug. Could you try it on a different computer and see if you can replicate?

        Comment


        • #6
          Nils,
          I am getting the exact same error


          In function "RGIndexMergeHelperFromDiskContig_8": Fatal Error[ReadFileError]. Message: Could not read in tmp lower.
          The file stream error was:: Bad file descriptor
          ***** Exiting due to errors *****
          ************************************************************

          [1]+ Exit 1 bfast index -m 111111111111111111111111 -w 14 -n 32 -i 1 -f hg19.fa

          Were you guys ever able to find out what the deal was with this one? I also have a 64 bit system with 2Tb disk space.
          -Ashish

          Comment


          • #7
            I would LOVE to get a test case so that I can reproduce. Until then, I have to keep guessing.

            Could you try to apply this change?
            Code:
            diff --git a/bfast/RGIndex.c b/bfast/RGIndex.c
            index 3e8f57a..2953596 100644
            --- a/bfast/RGIndex.c
            +++ b/bfast/RGIndex.c
            @@ -1356,8 +1356,15 @@ void RGIndexMergeHelperFromDiskContig_8(RGIndex *index,
                    }
             
                    /* Move to beginning of the files */
            +        /*
                    fseek(tmpLowerFP, 0 , SEEK_SET);
                    fseek(tmpUpperFP, 0 , SEEK_SET);
            +        */
            +        fclose(tmpLowerFP);
            +        tmpLowerFP = fopen(tmpLowerFileName, "wb+");
            +        assert(NULL != tmpLowerFP);
            +        tmpUpperFP = fopen(tmpUpperFileName, "wb+");
            +        assert(NULL != tmpUpperFP);

            Comment


            • #8
              +1, same error for me as well.

              Tested both extended_CFLAGS="-m64 -D_FILE_OFFSET_BITS=64" and the patch without any success .

              What could I do to help you find a solution Nils?

              Comment


              • #9
                Do you have a test case? Give me a FASTA and detail your environment (OS, machine, bfast version).

                Nils

                Comment

                Latest Articles

                Collapse

                • seqadmin
                  Non-Coding RNA Research and Technologies
                  by seqadmin


                  Non-coding RNAs (ncRNAs) do not code for proteins but play important roles in numerous cellular processes including gene silencing, developmental pathways, and more. There are numerous types including microRNA (miRNA), long ncRNA (lncRNA), circular RNA (circRNA), and more. In this article, we discuss innovative ncRNA research and explore recent technological advancements that improve the study of ncRNAs.

                  [Article Coming Soon!]...
                  Yesterday, 08:07 AM
                • seqadmin
                  Recent Developments in Metagenomics
                  by seqadmin





                  Metagenomics has improved the way researchers study microorganisms across diverse environments. Historically, studying microorganisms relied on culturing them in the lab, a method that limits the investigation of many species since most are unculturable1. Metagenomics overcomes these issues by allowing the study of microorganisms regardless of their ability to be cultured or the environments they inhabit. Over time, the field has evolved, especially with the advent...
                  09-23-2024, 06:35 AM
                • seqadmin
                  Understanding Genetic Influence on Infectious Disease
                  by seqadmin




                  During the COVID-19 pandemic, scientists observed that while some individuals experienced severe illness when infected with SARS-CoV-2, others were barely affected. These disparities left researchers and clinicians wondering what causes the wide variations in response to viral infections and what role genetics plays.

                  Jean-Laurent Casanova, M.D., Ph.D., Professor at Rockefeller University, is a leading expert in this crossover between genetics and infectious...
                  09-09-2024, 10:59 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by seqadmin, 10-02-2024, 04:51 AM
                0 responses
                14 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 10-01-2024, 07:10 AM
                0 responses
                24 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 09-30-2024, 08:33 AM
                1 response
                31 views
                0 likes
                Last Post EmiTom
                by EmiTom
                 
                Started by seqadmin, 09-26-2024, 12:57 PM
                0 responses
                20 views
                0 likes
                Last Post seqadmin  
                Working...
                X