featureCounts for multiple features

59 views
Skip to first unread message

Edward Wallace

unread,
Apr 6, 2020, 5:44:44 AM4/6/20
to Subread
Hi,
I'd like to add to requests that featureCoutns can count across multiple kinds of features, as discussed here:
https://support.bioconductor.org/p/110807/

There are many use-cases beyond counting exons. I am starting with the same use-case, where I want to count reads on five_prime_UTRs, three_prime_UTRs, and CDSs. Also one might want to count reads on exons and introns from the same file. Or might want to count reads on many different kinds of non-coding RNA in the same annotation (snRNA,tRNA, etc). Or on promoters vs transcripts.

Instead of these lines of code (taken from the bioconductor support):

featureCounts -t CDS -g gene_id -a $GTF -o counts.txt $BAM

featureCounts -t five_prime_UTR -g gene_id -a $GTF -o counts.txt $BAM

featureCounts -t three_prime_UTR -g gene_id -a $GTF -o counts.txt $BAM

We want this:

featureCounts -t CDS,five_prime_UTR,three_prime_UTR -g gene_id -a $GTF -o counts.txt $BAM

Surely this would be easy to fix? Instead of passing a single string to the -t argument and filtering by that, pass a character vector/list of strings and filter for inclusion?

I appreciate that the gff-fix workaround you propose in the above support issue works in principle, but it would be far better to add the capability to the software.

Thank you for making a great piece of software and for sharing it with the community! It is fast, effective, and well-documented. I'm a new user.

Best wishes,
Edward Wallace
https://ewallace.github.io/


Wei Shi

unread,
Apr 16, 2020, 7:28:01 PM4/16/20
to Subread
Dear Edward,

Apologies for my delayed response. I have been busy with moving my lab to a different institute.

Thank you very much for your suggestion - I agree it is better to directly support the counting of reads to multiple types of features at the same time. We have added this to our to-do list.

Kind regards,
Wei


Reply all
Reply to author
Forward
0 new messages