SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ray : Segmentation fault (11) Nagesh De novo discovery 3 02-02-2017 04:22 AM
Cuffdiff 2.2.0 segmentation fault blancha Bioinformatics 7 04-28-2014 01:24 AM
segmentation fault with cisGenome aquleaf Bioinformatics 0 10-03-2012 07:31 AM
cufflinks segmentation fault help please seq_newbie Bioinformatics 1 06-29-2011 11:52 AM
Newbler segmentation fault flobpf Bioinformatics 4 04-18-2011 11:45 AM

Reply
 
Thread Tools
Old 02-17-2015, 12:08 AM   #1
batel
Junior Member
 
Location: Israel

Join Date: Feb 2015
Posts: 5
Default 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!
batel is offline   Reply With Quote
Old 02-17-2015, 04:36 AM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,384
Default

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 at 05:54 AM.
GenoMax is offline   Reply With Quote
Old 02-17-2015, 05:39 AM   #3
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,467
Default

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).
dpryan is offline   Reply With Quote
Old 02-17-2015, 11:18 PM   #4
batel
Junior Member
 
Location: Israel

Join Date: Feb 2015
Posts: 5
Default 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?
batel is offline   Reply With Quote
Old 02-17-2015, 11:21 PM   #5
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,467
Default

If cufflinks worked with the file then presumably it's a bug in featureCounts. It would be good if you could notify the author.
dpryan is offline   Reply With Quote
Old 02-19-2015, 04:49 PM   #6
shi
Wei Shi
 
Location: Australia

Join Date: Feb 2010
Posts: 235
Default

Quote:
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
shi is offline   Reply With Quote
Old 03-10-2015, 01:47 AM   #7
batel
Junior Member
 
Location: Israel

Join Date: Feb 2015
Posts: 5
Default

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!
batel is offline   Reply With Quote
Old 03-19-2015, 05:57 PM   #8
shi
Wei Shi
 
Location: Australia

Join Date: Feb 2010
Posts: 235
Default

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
shi is offline   Reply With Quote
Old 10-27-2015, 12:01 PM   #9
santhilalsubhash
Member
 
Location: Gothenburg, Sweden

Join Date: May 2012
Posts: 18
Angry 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 at 12:04 PM.
santhilalsubhash is offline   Reply With Quote
Old 10-27-2015, 01:51 PM   #10
shi
Wei Shi
 
Location: Australia

Join Date: Feb 2010
Posts: 235
Default

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?
shi is offline   Reply With Quote
Old 10-27-2015, 02:28 PM   #11
santhilalsubhash
Member
 
Location: Gothenburg, Sweden

Join Date: May 2012
Posts: 18
Talking

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 at 02:33 PM.
santhilalsubhash is offline   Reply With Quote
Old 10-27-2015, 03:16 PM   #12
shi
Wei Shi
 
Location: Australia

Join Date: Feb 2010
Posts: 235
Default

OK, could you please just post the first few reads before we try to download the data?
shi is offline   Reply With Quote
Old 10-27-2015, 03:43 PM   #13
santhilalsubhash
Member
 
Location: Gothenburg, Sweden

Join Date: May 2012
Posts: 18
Default

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@<>@[email protected]?;93BCD=BBE=EEDHIGEGEA@;>CEFB<[email protected]	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	[email protected]FHHFFDEDCECEDDDDEDDEDDDDDDD?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>[email protected][email protected]	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-[email protected]&[email protected]@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	[email protected]?;=2@@66(3;@[email protected]>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 at 04:04 PM. Reason: Added CODE tags
santhilalsubhash is offline   Reply With Quote
Old 10-29-2015, 04:41 PM   #14
shi
Wei Shi
 
Location: Australia

Join Date: Feb 2010
Posts: 235
Default

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.
shi is offline   Reply With Quote
Old 10-29-2015, 09:03 PM   #15
santhilalsubhash
Member
 
Location: Gothenburg, Sweden

Join Date: May 2012
Posts: 18
Default

Thanks a lot. I will wait for that.
santhilalsubhash is offline   Reply With Quote
Old 12-18-2015, 03:57 AM   #16
santhilalsubhash
Member
 
Location: Gothenburg, Sweden

Join Date: May 2012
Posts: 18
Thumbs up subread-1.5.0-p1-source works

Thank you Wei Shi, the new patched version (subread-1.5.0-p1-source) works for these files now.
santhilalsubhash is offline   Reply With Quote
Old 01-03-2016, 04:11 PM   #17
shi
Wei Shi
 
Location: Australia

Join Date: Feb 2010
Posts: 235
Default

That's great. Thanks for letting us know.
shi is offline   Reply With Quote
Old 02-23-2016, 10:03 PM   #18
dvanic
Member
 
Location: Sydney, Australia

Join Date: Jan 2012
Posts: 61
Exclamation Error with long CIGARs

I'm trying to map some long reads (PacBio public human data), and use featureCounts to count reads to features (there are other ways of doing this, which I also use, but I'd like to use featureCounts on both the PacBio data and some IBM data to treat both datasets consistently. However, I'm getting the following error:

Code:
WARNING: cigar string is too long to the buffer.
Please only use the compressed BAM format.
featureCounts: sambam-file.c:594: PBam_chunk_gets: Assertion `0' failed.
Can you please update featureCounts to not collapse when a CIGAR is too long?

Thanks in advance,
Darya
dvanic is offline   Reply With Quote
Old 02-24-2016, 12:52 PM   #19
shi
Wei Shi
 
Location: Australia

Join Date: Feb 2010
Posts: 235
Default

What is the version of featureCounts you use?
shi is offline   Reply With Quote
Old 08-03-2016, 10:00 PM   #20
arkanion
Junior Member
 
Location: Singapore

Join Date: Jul 2016
Posts: 6
Default Segmentation fault (core dumped)

If I run the below command from the commandline it works fine, however it corrupts with "Segmentation fault (core dumped)" if I run within sh script:

Code:
featureCounts -T 10 -Q 10 -a library/genes.gtf -o gene_expression.txt 344/RNA-Seq/CD34_2_clean/CD34_2_clean_aligned_sorted.bam
Code:
        ==========     _____ _    _ ____  _____  ______          _____  
        =====         / ____| |  | |  _ \|  __ \|  ____|   /\   |  __ \ 
          =====      | (___ | |  | | |_) | |__) | |__     /  \  | |  | |
            ====      \___ \| |  | |  _ <|  _  /|  __|   / /\ \ | |  | |
              ====    ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
        ==========   |_____/ \____/|____/|_|  \_\______/_/    \_\_____/
	v1.5.0-p3

//========================== featureCounts setting ===========================\\
||                                                                            ||
||             Input files : 1 BAM file                                       ||
||                           P 344/RNA ... ||
||                                                                            ||
||             Output file : 344/RNA-S ... ||
||                 Summary : 344/RNA-S ... ||
||              Annotation : library/genes.gtf (GTF)            ||
||                                                                            ||
||                 Threads : 10                                                ||
||                   Level : meta-feature level                               ||
||              Paired-end : yes                                              ||
||         Strand specific : no                                               ||
||      Multimapping reads : not counted                                      ||
|| Multi-overlapping reads : not counted                                      ||
||                                                                            ||
||          Chimeric reads : counted                                          ||
||        Both ends mapped : not required                                     ||
||                                                                            ||
\\===================== http://subread.sourceforge.net/ ======================//

//================================= Running ==================================\\
||                                                                            ||
|| Load annotation file library/genes.gtf ...                   ||
||    Features : 430178                                                       ||
||    Meta-features : 23710                                                   ||
||    Chromosomes/contigs : 49                                                ||
||                                                                            ||
|| Process BAM file 344/RNA-Seq/CD34_2 ... ||
||    Paired-end reads are included.                                          ||
||    Assign fragments (read pairs) to features...                            ||
||                                                                            ||
||    WARNING: reads from the same pair were found not adjacent to each       ||
||             other in the input (due to read sorting by location or         ||
||             reporting of multi-mapping read pairs).                        ||
||                                                                            ||
||    Read re-ordering is performed.                                          ||
||                                                                            ||
Segmentation fault (core dumped)
Apparently the patch does not work on my system.

Is there any clever fix yet?

Last edited by arkanion; 08-04-2016 at 07:18 AM.
arkanion is offline   Reply With Quote
Reply

Tags
countdata, featurecounts

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 04:37 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO