Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • batel
    Junior Member
    • Feb 2015
    • 5

    featureCounts segmentation fault

    I have a lot of BAM files (from CCLE database), and I tried counting them using featureCounts.
    Some of the files works great, but many(!) of them featureCounts throws segmentation fault right after the 'Input files : 1 BAM file' line.
    I'm using the same annotation file all the time so I guess that's not the problem, I also tried to decrease the number of threads- didn't change anything..
    Can someone help me? had the same problem?
    my command is:
    featureCounts -p -T 5 -g gene_id -a /home/batel/GTF/combinedDB5.f1.pure.gtf -o fc.txt -b G30584.UM-UC-3.1.bam
    Thank you!
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    You could have somehow corrupted those BAM files.

    Have you tried to look at the problem BAM files (with samtools view) to see if there are any obvious problems? Do the file sizes look ok?
    Last edited by GenoMax; 02-17-2015, 06:54 AM.

    Comment

    • dpryan
      Devon Ryan
      • Jul 2011
      • 3478

      #3
      If what GenoMax suggested doesn't indicate where the problem is, then try htseq-count. If that runs into problems too then you know with certainty that you have issues with the BAM files. If it doesn't then maybe it's a featureCounts bug (in which case, try subsetting the file until you can find an alignment that causes the problem).

      Comment

      • batel
        Junior Member
        • Feb 2015
        • 5

        #4
        I tried cufflinks and it works great..

        that's why I don't think that the problem is at the BAM files..
        Do you think it's the BAM file?

        Comment

        • dpryan
          Devon Ryan
          • Jul 2011
          • 3478

          #5
          If cufflinks worked with the file then presumably it's a bug in featureCounts. It would be good if you could notify the author.

          Comment

          • shi
            Wei Shi
            • Feb 2010
            • 236

            #6
            Originally posted by batel View Post
            that's why I don't think that the problem is at the BAM files..
            Do you think it's the BAM file?
            Hi @batel,

            You do not need to use '-b' option when you provide BAM format input. featureCounts automatically detects input format for you.

            Please make sure you are using the latest version (1.4.6-p1). '-b' was an option used in old versions.

            If the problem persists after upgrading to the latest version, please provide the complete featureCounts output. This will be helpful for diagnosing the problem.

            Wei

            Comment

            • batel
              Junior Member
              • Feb 2015
              • 5

              #7
              Hi all,
              Thanks for yo9ur answers!
              I'm using version v1.4.6, Is it the latest?
              I also tried using Rsubread instead of directly, but it also crashes.
              The command is:
              featureCounts -p -T 5 -g gene_id -a combinedDB5.lincs.f1.pure.gtf -o fc.txt G28059.KMBC-2.1.bam

              The full output is:
              ========== _____ _ _ ____ _____ ______ _____
              ===== / ____| | | | _ \| __ \| ____| /\ | __ \
              ===== | (___ | | | | |_) | |__) | |__ / \ | | | |
              ==== \___ \| | | | _ <| _ /| __| / /\ \ | | | |
              ==== ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
              ========== |_____/ \____/|____/|_| \_\______/_/ \_\_____/
              v1.4.6

              //========================== featureCounts setting ===========================\\
              || ||
              || Input files : 1 BAM file ||
              Segmentation fault (core dumped)

              When I used featureCounts via R The command was:
              output <- featureCounts("data/BLCA/0aefd782-d636-4308-b940-63054b37e7b0/G28059.KMBC-2.1.bam", annot.ext="combinedDB5.lincs.f1.pure.gtf", isPairedEnd=TRUE, nthreads=3)

              ========== _____ _ _ ____ _____ ______ _____
              ===== / ____| | | | _ \| __ \| ____| /\ | __ \
              ===== | (___ | | | | |_) | |__) | |__ / \ | | | |
              ==== \___ \| | | | _ <| _ /| __| / /\ \ | | | |
              ==== ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
              ========== |_____/ \____/|____/|_| \_\______/_/ \_\_____/
              Rsubread 1.16.1

              //========================== featureCounts setting ===========================\\
              || ||
              || Input files : 1 BAM file ||

              *** caught segfault ***
              address (nil), cause 'unknown'

              Traceback:
              1: .C("R_readSummary_wrapper", as.integer(n), as.character(cmd), PACKAGE = "Rsubread")
              2: featureCounts("/home/batel/CCLEdata/BLCA/0aefd782-d636-4308-b940-63054b37e7b0/G28059.KMBC-2.1.bam", annot.ext = "/home/batel/lncGTF/combinedDB5.lincs.f1.pure.gtf", isPairedEnd = TRUE, nthreads = 3)

              Possible actions:
              1: abort (with core dump, if enabled)
              2: normal R exit
              3: exit R without saving workspace
              4: exit R saving workspace
              Selection: 1
              aborting ...
              Segmentation fault (core dumped)

              Thank you!

              Comment

              • shi
                Wei Shi
                • Feb 2010
                • 236

                #8
                The latest version is 1.4.6-p1. But I don't think that will make a difference.

                Have you tried @GenoMax's suggestion to check if your bam file is corrupted? You may also try to subset your bam file to try to find offending reads as suggested by @dpryan. Or alternatively, you may convert your bam file to a sam file to see if you will work.

                Wei

                Comment

                • santhilalsubhash
                  Member
                  • May 2012
                  • 19

                  #9
                  FeatureCounts problem

                  Same problem here, I have tried with Subread 1.4.5-p1 and 1.4.6-p5 Linux-x86_64 versions. I tried downloading the BAM file 7 times and I do not think it has corrupted during downloading because everything goes well while downloading from CGhub genetorrent (no errors). Please some body help me in resolving this issue. I have also crosschecked the BAM files with samtools, it works fine.



                  featureCounts -Q 10 -F GTF -a MY_ANNOTATION.gtf -t exon -g gene_id -o mypath/out_counts.txt mypath/celline1.bam

                  ========== _____ _ _ ____ _____ ______ _____
                  ===== / ____| | | | _ \| __ \| ____| /\ | __ \
                  ===== | (___ | | | | |_) | |__) | |__ / \ | | | |
                  ==== \___ \| | | | _ <| _ /| __| / /\ \ | | | |
                  ==== ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
                  ========== |_____/ \____/|____/|_| \_\______/_/ \_\_____/
                  v1.4.5-p1

                  //========================== featureCounts setting ===========================\\
                  || ||
                  || Input files : 1 BAM file ||
                  Segmentation fault (core dumped)
                  Last edited by santhilalsubhash; 10-27-2015, 12:04 PM.

                  Comment

                  • shi
                    Wei Shi
                    • Feb 2010
                    • 236

                    #10
                    There seems to be a problem with accessing reads in the BAM file. featureCounts tried to parse the bam file and read in first few reads, but do not know what happened there that caused seg fault. Could you please send us the link to the bam file you downloaded so we can take a close look?

                    Comment

                    • santhilalsubhash
                      Member
                      • May 2012
                      • 19

                      #11
                      Hello Wei Shi,

                      Thanks for your reply. But the problem is these BAM files are not publicly accessible. But if you have access to CGHub you can try downloading BAM file with this analysis id "0ab4dac4-bbb9-4cd5-ae67-9469c6e8f21b" using GeneTorrent. More info on this BAM file
                      Last edited by santhilalsubhash; 10-27-2015, 02:33 PM.

                      Comment

                      • shi
                        Wei Shi
                        • Feb 2010
                        • 236

                        #12
                        OK, could you please just post the first few reads before we try to download the data?

                        Comment

                        • santhilalsubhash
                          Member
                          • May 2012
                          • 19

                          #13
                          samtools view 0ab4dac4-bbb9-4cd5-ae67-9469c6e8f21b/G28064.MDA-MB-468.1.bam | head

                          Code:
                          C1E2NACXX130117:1:1309:3032:16444	419	1	11199	3	101M	=	11938	840	CCGCTTGCTCACGGTGCTGTGCCAGGGCGCCCCCTGCTGGCGACTAGGGCAACTGCAGGGCTCTCTTGCTTAGAGTGGTGGCCAGCGCCCCCTGCTGGGGC	CCCFFFFFHGHHHJEHJIIHIJJEJJJDHIJJJ<DFGGHIGIGGGFFCBCABBCCACCDDDDDDDDCDCDDCDC###########################	CC:Z:15	PG:Z:MarkDuplicates.3A	RG:Z:C1E2N.1	NH:i:2	HI:i:0	NM:i:1	CP:i:102519871	MQ:i:3	UQ:i:2
                          C1E2NACXX130117:1:1309:3032:16444	339	1	11938	3	101M	=	11199	-840	AGACTTCCCGTGTCCTTTCCACCGGGCCTTTGAGAGGTCACAGGGTCTTGATGCTGTGGTCTTCATCTGCAGGTGTCTGACTTCCAGCAACTGCTGGCCTG	344<5@<>@??A@BDCC?;93BCD=BBE=EEDHIGEGEA@;>CEFB<HGD@HDIIIGIIJJJIIJIJIJJJJJIFGIJIHIJIJJJJIHHHGHFFFFFCCC	CC:Z:15	PG:Z:MarkDuplicates.3A	RG:Z:C1E2N.1	NH:i:2	HI:i:0	NM:i:0	CP:i:102519132	MQ:i:3	UQ:i:0
                          C1E2NACXX130117:2:1305:12347:47337	355	1	12040	0	101M	=	12113	174	GCCAGGGTGCAAGCTGAGCACTGGAGTGGAGTTTCCCTGTGGAGAGGAGCCATGCCTAGAGTGGGATGGGCCATTGTTCATCTTCTGGCCCCTGTTGTCTG	CC@FFFFDHHHHGIJJDGCEHIIICEEFGEHGIIGGGGGGGGIHIGIIIGHJJJIJIGIHGEEGHFHHFFDEDCECEDDDDEDDEDDDDDDD?BCCCCCDA	CC:Z:15	PG:Z:MarkDuplicates.2C	RG:Z:C1E2N.2	NH:i:5	HI:i:0	NM:i:1	CP:i:102519030	MQ:i:0	UQ:i:38
                          C1DVPACXX130111:2:2210:2530:60149	163	1	12042	0	101M	=	12082	141	CAGGGTGCAAGCTGAGCACTGGAGTGGAGTTTTCCTGTGGAGAGGAGCCATGCCTAGAGTGGGATGGGCCATTGTTCATCTTCTGGCCCCTGTTGTCTGCA	CCCFFDDFHHHHHIIJJJJJJJGIFGIIJIJJJJJJJHIJIJIJJJJJJJEHIJJIJIJFHIJJJHHHFFFFFDEDEEEEDDEDCCDDDDBDDDDCDDDD#	CC:Z:15	PG:Z:MarkDuplicates.2R	RG:Z:C1DVP.2	NH:i:5	HI:i:0	NM:i:0	CP:i:102519028	MQ:i:0	UQ:i:0
                          D1JYHACXX130117:5:2113:9637:43505	345	1	12048	0	101M	=	12048	0	GCAAGCTGAGCACTGGAGTGGAGTTTTCCTGTGGAGAGGAGCCATGCCTAGAGTGGGATGGGCCATTGTTCATCTTCTGGCCCCTGTTGTCTGCATGTAAC	<<DCC?:>DC@;ACCCA<CCCCACA@@A>?D@CBHGEHHGDIJJIIHIJJJJJIJJJJJJIFHHJJJJIJIIIJIIJIJJJJJJJIJIHFHHHFFFFFC@C	CC:Z:15	PG:Z:MarkDuplicates.33	RG:Z:D1JYH.5	NH:i:6	HI:i:0	NM:i:0	CP:i:102519022	UQ:i:0
                          C1E2NACXX130117:6:1102:7112:41762	165	1	12055	0	*	=	12055	0	CGCGCCTCCGCCGGCGCGCCGCGCCTCTCCGCACCTCTCCGCGCCTCCGCCGGCGCGCCGCCTTTGCGAGGGCGGAGTTGCGTTCTCTTTAGCACACAGCC	@@@DDDDDHFFFHAHGDD>GFG=A9B<@CCBBBBBC?>CC837@B8-?@BBB&07@B57B@B@;CCA7>99;;;95<+9+:-5<BBA>CC3>>CAA?@?AA	PG:Z:MarkDuplicates.30	RG:Z:C1E2N.6
                          C1E2NACXX130117:6:1102:7112:41762	89	1	12055	0	101M	=	12055	0	GAGCACTGGAGTGGAGTTTTCCTGTGGAGAGGAGCCATGCCTAGAGTGGGATGGGCCATTGTTCATCTTCTGGCCCCTGTTGTCTGCATGTAACTTAATAC	###########@CCCAAA?;=2@@66(3;@FFE?HFGIGIIIHFF@DEHGGGHDF>GDBBB:GHFBCIGHFC::;@EIIIIGCFIEBHFA?BBDDFDD<??	CC:Z:15	PG:Z:MarkDuplicates.30	RG:Z:C1E2N.6	NH:i:6	HI:i:0	NM:i:0	CP:i:102519015	UQ:i:0
                          C1DVPACXX130111:2:2210:2530:60149	83	1	12082	0	101M	=	12042	-141	AGAGGAGCCATGCCTAGAGTGGGATGGGCCATTGTTCATCTTCTGGCCCCTGTTGTCTGCATGTAACTTAATACCACAACCAGGCATAGGGGAAAGATTGG	3CDDDDDDDDDDDDDDDDDDDEEECCFEDDFHFGHHJIJJJJJJJIGJIJJJIJJIJJJJJJJJJIJJIJJIHJIHJIGJJJIJJJIJHHHHHFFFFFCCC	CC:Z:15	PG:Z:MarkDuplicates.2R	RG:Z:C1DVP.2	NH:i:5	HI:i:0	NM:i:0	CP:i:102518988	MQ:i:0	UQ:i:0
                          C1E2NACXX130117:2:1305:12347:47337	403	1	12113	0	101M	=	12040	-174	TTGTTCATCTTCTGGCCCCTGTTGTCTGCATGTAACTTAATACCACAACCAGGCATAGGGGAAAGATTGGAGGAAAGATGAGTGAGAGCGTCAACTTCTCT	?DDDCDCDDDDDBDDDB?CDFFFFHGGHHHJJIJJJIJIGF=IIJIHDHGGIIIJIIIIIJJJJIJJIJJIJJJJIJJJJIJIJJJIHF<HFHFFFFFCCC	CC:Z:15	PG:Z:MarkDuplicates.2C	RG:Z:C1E2N.2	NH:i:5	HI:i:0	NM:i:1	CP:i:102518957	MQ:i:0	UQ:i:27
                          C1E2NACXX130117:7:1102:9623:27660	355	1	12294	1	101M	=	12318	125	CCCCTACCTGCCGTCTGCTGCCATCGGAGCCCAAAGCCGGGCTGTGACTGCTCAGACCAGCCGGCTGGAGGGAGGGGCTCAGCAGGTCTGGCTTTGGCCCT	CCCFFFFFHHHHHJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJHHHHHFFFFFEDDDDDDDDDDDDDDDDDDDDDDDCBD?CDDDDDDDDDDDB?	CC:Z:15	PG:Z:MarkDuplicates.2A	RG:Z:C1E2N.7	NH:i:3	HI:i:0	NM:i:0	CP:i:102518776	MQ:i:1	UQ:i:0
                          Link to screeshot:

                          Last edited by GenoMax; 10-27-2015, 04:04 PM. Reason: Added CODE tags

                          Comment

                          • shi
                            Wei Shi
                            • Feb 2010
                            • 236

                            #14
                            We have downloaded the bam file and found that the problem was caused by excessively long bam header lines.

                            We will try to fix this and release a patched version soon.

                            Comment

                            • santhilalsubhash
                              Member
                              • May 2012
                              • 19

                              #15
                              Thanks a lot. I will wait for that.

                              Comment

                              Latest Articles

                              Collapse

                              • SEQadmin2
                                From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
                                by SEQadmin2


                                Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


                                The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
                                ...
                                06-02-2026, 10:05 AM
                              • SEQadmin2
                                Single-Cell Sequencing at an Inflection Point: Early Impacts of New Platforms and Emerging Trends
                                by SEQadmin2


                                With the launch of new single-cell sequencing platforms in 2026, the field stands at an exciting inflection point. This article surveys the most impactful advances in the field and discusses how they’re reshaping research in cancer, immunology, and beyond.


                                Introduction

                                Single-cell sequencing technologies have undergone remarkable advances over the past decade, transitioning from low-throughput experimental approaches to highly scalable platforms capable of...
                                05-22-2026, 06:42 AM
                              • SEQadmin2
                                Environmental Genomics in the Age of NGS: From Microbes to Conservation Strategies
                                by SEQadmin2

                                Studying ecosystems means dealing with complex, multi-species communities that are hard to observe at scale. This complexity, however, hides many important questions to be answered, from how biogeochemical cycles work and how climate change can affect species distribution to how conservation strategies can work best.


                                Genomics, particularly since the expansion of NGS, has transformed ecosystem ecology. By sequencing environmental DNA, we can now assess biodiversity without direct...
                                05-06-2026, 09:04 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by SEQadmin2, Yesterday, 08:59 AM
                              0 responses
                              14 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-02-2026, 12:03 PM
                              0 responses
                              22 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-02-2026, 11:40 AM
                              0 responses
                              19 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 05-28-2026, 11:40 AM
                              0 responses
                              32 views
                              0 reactions
                              Last Post SEQadmin2  
                              Working...