Hi, using this code in both RStudio and R:
conteototalnuevo = featureCounts(files=c("1077_C274.bam", "1078_C283.bam", "1079_C3_MAC-277.bam", "1080_M1-MA-269.bam", "1081_M2-MA-239.bam", "1082_M3-MA-305.bam", "1083_CM1-363.bam", "1084_CM2-369.bam", "1085_CM3-MAC-360.bam", "1086_MM1-MA-376.bam", "1087_MM2-MA-383.bam", "1088_MM3-MA-342.bam"), annot.ext="Mus_musculus.GRCm38.82.gtf", isGTFAnnotationFile=TRUE)
In Rstudio pop-ups a window with a bomb saying:
R Session aborted
R encountered a fatal error.
The session was terminated.
In R:
========== _____ _ _ ____ _____ ______ _____
===== / ____| | | | _ \| __ \| ____| /\ | __ \
===== | (___ | | | | |_) | |__) | |__ / \ | | | |
==== \___ \| | | | _ <| _ /| __| / /\ \ | | | |
==== ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
========== |_____/ \____/|____/|_| \_\______/_/ \_\_____/
Rsubread 1.20.2
//========================== featureCounts setting ===========================\\
|| ||
|| Input files : 12 BAM files ||
*** caught segfault ***
address (nil), cause 'unknown'
Traceback:
1: .C("R_readSummary_wrapper", as.integer(n), as.character(cmd), PACKAGE = "Rsubread")
2: featureCounts(files = c("1077_C274.bam", "1078_C283.bam", "1079_C3_MAC-277.bam", "1080_M1-MA-269.bam", "1081_M2-MA-239.bam", "1082_M3-MA-305.bam", "1083_CM1-363.bam", "1084_CM2-369.bam", "1085_CM3-MAC-360.bam", "1086_MM1-MA-376.bam", "1087_MM2-MA-383.bam", "1088_MM3-MA-342.bam"), annot.ext = "/media/pablo/datos/TFM/Mus_musculus.GRCm38.82.gtf", isGTFAnnotationFile = TRUE)
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:
Hope it helps, thanks in advance.
No error message?
Hi, just pop-ups a window saying:
R encountered a fatal error.
The session was terminated.
And a button of "Start New Session".
And if you try the same mapping using the command-line version of featureCounts? Does it works?edit:
I like RStudio a lot, but it interacts badly with some packages. Did you try running on a plain R session?Sorry, I overlooked this bit.
Hi, it gives me a segfault error.
Yes, it seems your SAF is to blame. Maybe it has hidden characters? Or wrong number of columns? To check for number of columns:
To grep for hidden characters, you may try this tip.
Hi, thanks for your answer.
Using awk I found I have the required 5 columns. The file is also tab-delimited.
I tried some of the options of the link, None of them show any result. Nevertheless, I will explore this option.
Apart from that, featureCounts fails at the very beginning of the analysis, so I'm suspicious if it is about the BAM files. As I said, I didn't change nothing of them but maybe is an issue about a previous version of Rsubread? Unfortunately, I don't know the version I used the first time so maybe the version I have now works diferent? This are just some thoughts I have, in case somebody came across to a related issue.
Thanks again for your time!
where is the function featureCounts coming from? Does it use compiled code, does it use external binaries? Maybe it makes sense to get the latest version of the package sources and compile them instead of installing a binary package?
Hi, thanks for your reply.
featureCounts comes from both Rsubread, an R package and from Subread, an executable command-line package.
I ignore what version (binary/source) Rsubread uses, but I used the binary version of Subread. I'll try the source version.
Thanks again!
Hi, I used the source package and it gives the same segfault error, both using my SAF file and using an unmodified GTF file from Emsembl.
Could you post a reproducible example, including one of your bam files, the GTF file that give a seg fault?
Hi, you mean post some screenshots of the files or copy paste them here or in my original post?
The SAM file from one BAM file looks like:
The GTF file looks like:
Hope it helps, thank you in advance.
Hi,
I am facing a similiar problem. Using Ubuntu 14.04 and R version 3.2.2 on Amazon EC2. Using same mouse Ensembl GTF. R is crashing on using a single bam file.
Thanks
Hi, I don't know if is the main reason but I notice in my case the problem was caused by the header of the BAM file. However, I didn't find the problematic line or tag.