Segmentation failed (core dumped) error in featureCounts
2
0
Entering edit mode
5.8 years ago
Batu ▴ 250

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...

RNA-Seq software error sequencing • 4.8k views
ADD COMMENT
1
Entering edit mode

I've occasionally run into segfaults with featureCounts and found that switching versions (typically to the newest one) tends to resolve this.

ADD REPLY
0
Entering edit mode

Switching with 1.6.2 did not resolve the problem

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
1
Entering edit mode
5.7 years ago
Batu ▴ 250

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!!

ADD COMMENT
1
Entering edit mode
5.8 years ago
ATpoint 81k

How much memory do you have available?

ADD COMMENT
0
Entering edit mode

I have 8GB RAM on my PC

ADD REPLY
0
Entering edit mode

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!!

ADD REPLY
0
Entering edit mode

Good to hear it worked. Please consider to mark the answer as accepted to help others in the future.

ADD REPLY
0
Entering edit mode

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...

ADD REPLY
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 2480 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