Question: Options Request for FeatureCounts
0
gravatar for Leon
15 months ago by
Leon0
Leon0 wrote:

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 • 341 views
ADD COMMENTlink modified 15 months ago by Wei Shi3.2k • written 15 months ago by Leon0
Answer: Options Request for FeatureCounts
0
gravatar for Wei Shi
15 months ago by
Wei Shi3.2k
Australia
Wei Shi3.2k wrote:

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 COMMENTlink written 15 months ago by Wei Shi3.2k
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 REPLYlink written 15 months ago by Leon0

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 REPLYlink written 15 months ago by Wei Shi3.2k

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 REPLYlink written 14 months ago by Leon0

Could you try the latest version?

ADD REPLYlink written 14 months ago by Wei Shi3.2k

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

ADD REPLYlink written 14 months ago by Leon0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 379 users visited in the last hour