Options Request for FeatureCounts
1
0
Entering edit mode
Leon • 0
@leon-16422
Last seen 17 months ago
United States

Hi,

The options read2pos and readExtension3 are usefull for counting fixed fragments (Feature request for Rsubread::featureCounts: read length adjustment). Recently I considered one condition of counting reads based on their 5' most base, whose position was shifted. For example, the 5' most base is first shifted by a fixed number based on POS and CIGAR fields, then reads are summarized. It is useful if the middle point of fragments are considered in some IP experiments. So an added option shift and read2pos will be able to handle this situation well.

And, is it possible to add another option to count reads only in plus or minus strand of the genomes?

I also expect these options can be added in the linux version.

Thanks.

featurecounts subread • 1.5k views
ADD COMMENT
0
Entering edit mode
Wei Shi ★ 3.6k
@wei-shi-2183
Last seen 10 days ago
Australia/Melbourne/Olivia Newton-John …

You can use read2pos=5 together with readExtension5 to shift the 5' most base of a read to any position you want. The read is first extended upstream by number of bases specified by readExtension5, and then it is reduced to its new 5' most base. Note that the 5' most base can be shifted downstream as well if you provide a negative value to readExtension5. Would this enable you to do what you want to do?

Regarding your request for counting positive-strand only or negative-strand only reads, I think you can simply subset the counts by performing filtering on the strandness?

ADD COMMENT
0
Entering edit mode
If a read is extended before it is reduced, this can do what I wanna do. But according to your answers in the post ([Feature request for Rsubread::featureCounts: read length adjustment](https://support.bioconductor.org/p/59273/)), it seems to me that reduction happens prior to extension. So when using `readpos` and `readExtension` together, a fixed lenght of a read is expected, not a single base. Maybe I misunderstand it. For counting reads in plus or minus strand, samtools performs well in the filtering process. But when multiple bam files are fed to FeatureCounts, it is unpractical in one line command. I can divide the annotation file into two files to accommodate this situation, but it seems not to work for paired-end data (One situation would be also considered that `-p` is not used in paired-end data).
ADD REPLY
0
Entering edit mode

As I explained in my reply above, a read is extended first and then it will be reduced to a single base.

Regarding strandness filtering, you do not need to filter reads. You can directly filter counts by performing filtering on the object returned by featureCounts (strand info is included for every feature).

ADD REPLY
0
Entering edit mode

In featureCounts v1.6.0 (linux version), I found that `readExtension5` could not be set a negative value. The error message was 'Value for argumant --readExtension5 is out of range: 0 to 2147483647'. Could you fix it? Thanks!

ADD REPLY
0
Entering edit mode

Could you try the latest version?

ADD REPLY
0
Entering edit mode

I tried v1.6.2, but it still didn't work.

ADD REPLY

Login before adding your answer.

Traffic: 788 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6