STAR: Problem with generating BAM file

Hi Alex,

I got a problem while generating BAM files using STAR 2.7.9a. The error message was following: EXITING because of FATAL ERROR: number of bytes expected from the BAM bin does not agree with the actual size on disk: Expected bin size=9792429096 ; size on disk=0 ; bin number=46

The commands I used are following: for ID in cat list.txt do mkdir star_${ID} star --runThreadN 4 \ --limitBAMsortRAM 31000000000 \ --genomeDir genome \ --outFileNamePrefix ${ID}_ \ --quantMode TranscriptomeSAM \ --outSAMtype BAM SortedByCoordinate \ --readFilesIn ${ID}_trim_pair_1.fastq.gz ${ID}_trim_pair_2.fastq.gz \ --readFilesCommand gunzip -c done

There was actually enough space to run them (>400 GB). I also did ulimit -n 10000. I successfully completed the mapping with test fastq.gz files which were small files before. Could you please help me correct the error? Thank you so much!

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

Hi Alex, I think the fastq was not sorted before running STAR. I only processed it using Trimmomatic for adaptor and low quality trimming. I tried ulimit -n 10000 but the same issue occurred.

I will do it with samtools as you suggested at this time.

Thanks a lot.