This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bwa job - error with file size

Hi!

I'm trying to convert my .fastq files to .sam doing the alignment and continue pre-processing in order to obtain the read counts, but i've reiteratively received an error processing a .fastq of 4'27 GB and 107073636 lines.

the code is:

./bwa mem /path/to/Homo_sapiens.GRCh38.dna.primary_assembly.fa /path/to/.fastq > /path/to/.sam

and the error is:

[fputs] File too large

Thanks!

bwa rna-seq fastq sam alignment

You can avoid the intermediate sam file to save space and write directly to bam:

bwa mem genome.fa reads.fastq | samtools sort -o alignment.bam

1 answer

what is your filesystem? fat32 ? you cannot write a file with size > 4 G : https://en.wikipedia.org/wiki/File_Allocation_Table#FAT32

The maximum possible size for a file on a FAT32 volume is 4 GiB minus 1 byte or 4,294,967,295 (232 − 1) bytes.

Hi Pierre, thank you for answering!

That was exactly the problem... I'll try with APFS

Log in to answer this question.