SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
A question about BFAST indexing cllorens Bioinformatics 5 12-08-2011 06:32 AM
BFAST indexing phatjoe Bioinformatics 1 09-08-2011 07:39 PM
Trouble indexing reference db for BFAST jmartin Bioinformatics 8 08-19-2011 09:05 AM
problem with indexing using bfast fjackling Bioinformatics 2 06-30-2011 05:19 PM
BFAST indexing memory requirements jmartin Bioinformatics 2 04-12-2010 08:42 AM

Reply
 
Thread Tools
Old 05-12-2011, 05:35 AM   #1
fpruzius
Junior Member
 
Location: Utrecht, Netherlands

Join Date: Sep 2009
Posts: 4
Default 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.
fpruzius is offline   Reply With Quote
Old 05-12-2011, 08:18 AM   #2
nilshomer
Nils Homer
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285
Default

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".
nilshomer is offline   Reply With Quote
Old 06-10-2011, 01:56 AM   #3
fpruzius
Junior Member
 
Location: Utrecht, Netherlands

Join Date: Sep 2009
Posts: 4
Default

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 *****
************************************************************
fpruzius is offline   Reply With Quote
Old 06-10-2011, 09:17 AM   #4
nilshomer
Nils Homer
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285
Default

Quote:
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?
nilshomer is offline   Reply With Quote
Old 06-10-2011, 10:14 AM   #5
brentp
Member
 
Location: salt lake city, UT

Join Date: Apr 2010
Posts: 72
Default

Also see this thread:

http://sourceforge.net/mailarchive/f...ame=bfast-help
brentp is offline   Reply With Quote
Old 06-11-2011, 05:57 PM   #6
cdry7ue
Member
 
Location: Austin

Join Date: Feb 2011
Posts: 20
Default

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
cdry7ue is offline   Reply With Quote
Old 06-12-2011, 01:34 AM   #7
nilshomer
Nils Homer
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285
Default

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);
nilshomer is offline   Reply With Quote
Old 08-17-2011, 07:00 AM   #8
Magnus
Junior Member
 
Location: Uppsala, Sweden

Join Date: Nov 2009
Posts: 5
Default

+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?
Magnus is offline   Reply With Quote
Old 08-17-2011, 07:26 PM   #9
nilshomer
Nils Homer
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285
Default

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

Nils
nilshomer is offline   Reply With Quote
Reply

Tags
bad file descriptor, bfast, bfast index, color space, solid

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 09:01 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO