R session aborts with featureCounts

48 views
Skip to first unread message

J Summe

unread,
Jun 10, 2020, 1:26:11 PM6/10/20
to Subread
Hello,

I'm using Rsubread version 2.0.1 and trying to run featureCounts with a BAM file produced by the align function in Rsubread. I've attached the .bam file and the .gtf file that I'm using to count against. Every time I've tried to run this command in Rstudio, the R session aborts. I'm using just one of the my 31 bam files to troubleshoot and have tried a few others but it still results in an error.

Any help would be much appreciated!

Here are the first few lines of the .gtf file:
10000048        transdecoder    gene    1       514     .       -       .       gene_id "GENE.10000048~~10000048.p1"; gene_name "ORF%20type%3A5prime_partial%20len%3A167%20%28-%29%2Cscore%3D8.24";
10000048        transdecoder    mRNA    1       514     .       -       .       transcript_id "10000048.p1"; gene_id "GENE.10000048~~10000048.p1"; transcript_name "ORF%20type%3A5prime_partial%20len%3A167%20%28-%29%2Cscore%3D8.24";
10000048        transdecoder    exon    1       514     .       -       .       gene_id "10000048.p1.exon1"; transcript_id "10000048.p1.exon1"; exon_number "1"; gene_name "ORF%20type%3A5prime_partial%20len%3A167%20%28-%29%2Cscore%3D8.24"; transcript_name "ORF%20type%3A5prime_partial%20len%3A167%20%28-%29%2Cscore%3D8.24";
10000048        transdecoder    CDS     14      514     .       -       0       gene_id "cds.10000048.p1"; transcript_id "cds.10000048.p1"; gene_name "ORF%20type%3A5prime_partial%20len%3A167%20%28-%29%2Cscore%3D8.24"; transcript_name "ORF%20type%3A5prime_partial%20len%3A167%20%28-%29%2Cscore%3D8.24";
10000048        transdecoder    three_prime_UTR 1       13      .       -       .       three_prime_UTR_id "10000048.p1.utr3p1"; transcript_id "10000048.p1";
                                                                ";
10000534        transdecoder    gene    1       299     .       +       .       gene_id "GENE.10000534~~10000534.p2"; gene_name "ORF%20type%3Ainternal%20len%3A100%20%28%2B%29%2Cscore%3D21.72";
10000534        transdecoder    mRNA    1       299     .       +       .       transcript_id "10000534.p2"; gene_id "GENE.10000534~~10000534.p2"; transcript_name "ORF%20type%3Ainternal%20len%3A100%20%28%2B%29%2Cscore%3D21.72";
10000534        transdecoder    exon    1       299     .       +       .       gene_id "10000534.p2.exon1"; transcript_id "10000534.p2.exon1"; exon_number "1"; gene_name "ORF%20type%3Ainternal%20len%3A100%20%28%2B%29%2Cscore%3D21.72"; transcript_name "ORF%20type%3Ainternal%20len%3A100%20%28%2B%29%2Cscore%3D21.72";
10000534        transdecoder    CDS     3       299     .       +       0       gene_id "cds.10000534.p2"; transcript_id "cds.10000534.p2"; gene_name "ORF%20type%3Aint

J Summe

unread,
Jun 10, 2020, 1:28:25 PM6/10/20
to Subread
Sorry here are the commands I ran:

bams<-list.files(path=".",pattern="bamfile.bam")
featureCounts(files=bams, annot.ext=gtf,isGTFAnnotationFile=TRUE, isPairedEnd=TRUE, nthreads=2, autosort=TRUE)



Yang LIAO

unread,
Jun 10, 2020, 6:46:03 PM6/10/20
to Subread
Thanks for the bug report, but I cannot find the attachments to your post. If the files are too large, you may consider sharing them using OneDrive/Dropbox/etc. I can also create a cloud sharing space so you can upload your BAM file into it.

The first few lines in your GTF file seem OK and your commands are correct. 

J Summe

unread,
Jun 12, 2020, 9:11:27 AM6/12/20
to Subread
Hi thank you ! Here is a link to the bam file I was using:


Let me know if there are any issues. Thank you again for your help!

Yang LIAO

unread,
Jun 12, 2020, 6:48:16 PM6/12/20
to Subread
Thank you, Summe. I have downloaded it and you may delete the shared file.

However, I didn't have any errors when I used Rsubread-2.0.1 to count your BAM file. The program finished smoothly. Because you didn't share your GTF file, I used a random GTF file in my test.

Can you also share your GTF annotation?

Yang LIAO

unread,
Jun 12, 2020, 7:01:54 PM6/12/20
to Subread
Also, can you provide the sessionInfo() output in Rstudio?
I hope to know the architecture of the system and the R version, etc.

J Summe

unread,
Jun 13, 2020, 12:05:26 PM6/13/20
to Subread
Yes, here's the sessionInfo()

sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] Rsubread_2.0.1

loaded via a namespace (and not attached):
[1] compiler_3.6.0 tools_3.6.0    knitr_1.28     xfun_0.14

Yang LIAO

unread,
Jun 14, 2020, 11:10:49 PM6/14/20
to Subread
Thanks, Summe. I have had your GTF file. This GTF file has many lines that don't follow the GTF format. For example, the 6th line is nothing but TABs, a quotation mark, and a semicolon. 

After removing these lines, featureCounts was able to produce read counts on it.
Reply all
Reply to author
Forward
0 new messages