After running samtools, the featureCounts command crashed.
1
0
Entering edit mode
Rui • 0
@04ff3e59
Last seen 9 weeks ago
Hong Kong

I run follow Command-line code:

Linux (Ununtu 22.04.5 LTS in Whidows WSL)

hisat2 -p 6 --dta -x /mnt/d/hiv_omics/scripts/Hisat2_index/genome_tran  -U /mnt/d/hiv_omics/GSE180044/SRR15127754/trimmed_output/SRR15127754_trimmed.fq.gz  -S /mnt/d/hiv_omics/GSE180044/SRR15127754/alignment/SRR15127754_align.sam

samtools view -@ 8 -bS /mnt/d/hiv_omics/GSE180044/SRR15127754/alignment/SRR15127754_align.sam | samtools sort -@ 8 -o /mnt/d/hiv_omics/GSE180044/SRR15127754/alignment/SRR15127754_align.sorted.bam

samtools markdup -@ 8 -r -s /mnt/d/hiv_omics/GSE180044/SRR15127754/alignment/SRR15127754_align.sorted.bam /mnt/d/hiv_omics/GSE180044/SRR15127754/alignment/SRR15127754_align.dedup.bam

featureCounts -T 8 -t exon -g gene_id -a /mnt/d/hiv_omics/scripts/Homo_sapiens.GRCh38.114.gtf --primary -o /mnt/d/hiv_omics/GSE180044/SRR15127754/alignment/SRR15127754_counts.txt /mnt/d/hiv_omics/GSE180044/SRR15127754/alignment/SRR15127754_align.dedup.bam

In the final step (featureCount), the report error is: buffer overflow detected : terminated Aborted (core dumped)

How can I solve it. Thanks. Rui Tang

RNASeqData Bioconductor RNASeq • 314 views
ADD COMMENT
0
Entering edit mode
Kevin Blighe ★ 4.0k
@kevin
Last seen 53 minutes ago
The Cave, 181 Longwood Avenue, Boston, …

Hello Rui Tang,

The buffer overflow error in featureCounts that you encountered is likely due to a compatibility issue between the Subread package and the glibc library in your WSL environment. This can trigger memory handling problems, especially with large BAM files or annotation data, leading to the detected overflow and core dump.

To resolve this, first verify your featureCounts version by running:

featureCounts -v

If it is older than 2.0.0, update to the latest Subread package (currently version 2.1.1 is available via Bioconda). Install Bioconda if needed, then use:

conda install -c bioconda subread

If the error persists, recompile Subread from source with an updated glibc. Update glibc in your Ubuntu WSL to at least version 2.35 (which is default in 22.04, but confirm with ldd --version). Download Subread source from https://subread.sourceforge.net/, extract it, and compile:

cd src
make -f Makefile.Linux

Add the bin directory to your PATH:

export PATH=$PATH:/path/to/subread/bin

Additionally, WSL performance degrades on Windows-mounted drives like /mnt/d. Copy your files to a Linux directory such as ~/data and rerun the pipeline from there to avoid I/O bottlenecks that may contribute to the error.

Test with fewer threads initially:

featureCounts -T 1 -t exon -g gene_id -a /path/to/Homo_sapiens.GRCh38.114.gtf --primary -o /path/to/SRR15127754_counts.txt /path/to/SRR15127754_align.dedup.bam

If successful, increase threads gradually. Also, validate your BAM file:

samtools quickcheck /path/to/SRR15127754_align.dedup.bam

If it reports issues, recreate the BAM.

Kevin

ADD COMMENT

Login before adding your answer.

Traffic: 625 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6