I have 8GB RAM on my PC
Hello,
When I run featureCounts, it gives an error after loading GTF file and showing number of chromosomes.
featureCounts -T 3 -t exon -g gene_id -a "/mnt/c/Users/user/Desktop/STEMCELL/RNA_3/References/Homo_sapiens.GRCh38.92.gtf" -o "/mnt/c/Users/user/Desktop/STEMCELL/RNA_3/Output_Files/SRR1639080_readCounts.txt" "/mnt/c/Users/user/Desktop/STEMCELL/RNA_3/Output_Files/SRR1639080_sorted.bam"
Output is below:
========== _____ _ _ ____ _____ ______ _____
===== / ____| | | | _ \| __ \| ____| /\ | __ \
===== | (___ | | | | |_) | |__) | |__ / \ | | | |
==== \___ \| | | | _ <| _ /| __| / /\ \ | | | |
==== ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
========== |_____/ \____/|____/|_| \_\______/_/ \_\_____/
v1.6.0
//========================== featureCounts setting ===========================\\
|| ||
|| Input files : 1 BAM file ||
|| S /mnt/c/Users/user/Desktop/STEMCELL/RNA_3/O ... ||
|| ||
|| Output file : /mnt/c/Users/user/Desktop/STEMCELL/RNA_3/Out ... ||
|| Summary : /mnt/c/Users/user/Desktop/STEMCELL/RNA_3/Out ... ||
|| Annotation : /mnt/c/Users/user/Desktop/STEMCELL/RNA_3/Ref ... ||
|| Dir for temp files : /mnt/c/Users/user/Desktop/STEMCELL/RNA_3/Out ... ||
|| ||
|| Threads : 3 ||
|| Level : meta-feature level ||
|| Paired-end : no ||
|| Strand specific : no ||
|| Multimapping reads : not counted ||
|| Multi-overlapping reads : not counted ||
|| Min overlapping bases : 1 ||
|| ||
\\===================== http://subread.sourceforge.net/ ======================//
//================================= Running ==================================\\
|| ||
|| Load annotation file /mnt/c/Users/user/Desktop/STEMCELL/RNA_3/Referenc ... ||
|| Features : 1237303 ||
|| Meta-features : 58395 ||
|| Chromosomes/contigs : 47 ||
|| ||
Segmentation fault (core dumped)
I couldn't find anything specific for featureCounts. But in the posts, it is generally said that "Segmentation fault" means that you tried to access memory that you do not have access to. I couldn't resolve how I can resolve it.
Any ideas or suggestions? Thanks...
2 answers
Workaround for this problem is to recompile subread package with the recent glibc (https://github.com/Microsoft/WSL/issues/3391). To do that, update glibc to the newest version (2.23), and then compile the source of the package, and introduce its "bin" directory to path. Problem solved!!
How much memory do you have available?
I've tried the same code in another PC with 16GB of memory, and it worked seamlessly. So the problem was the memory. Thanks for your help!!
Good to hear it worked. Please consider to mark the answer as accepted to help others in the future.
My friend tried featureCounts on a computer with much higher RAM, but she got the same error. When I solved the problem, I tried on computer with Ubuntu. But me and my friend are using Ubuntu in Windows (WSL). Can this be a reason? How and why this problem occurs? Any idea? Thanks...
Hard to say, upload the files to a public Galaxy server and try there. That'll be using a regular linux server to run things.
It does not matter how much RAM the host computer has, but how much is allocated to the virtual machine. Check how much is indeed consumable for the VM.
Actually, WSL is not a virtual machine. It is a subsystem in Windows and works almost natively (almost, because I had an error). I saw that there was a bug that restricts the usage of RAM on WSL 2 years ago, but now it is fixed and I can see all amount of RAM there.
Log in to answer this question.
I've occasionally run into segfaults with featureCounts and found that switching versions (typically to the newest one) tends to resolve this.
Switching with 1.6.2 did not resolve the problem
If anyone is using multiple BAM files with featureCounts and gets the exact same error, it's because of the multicore function (-T). Remove -T option and it will work like a charm with multiple BAM files.