1
0
Entering edit mode
s.muroy ▴ 10
@5289631e
Last seen 9 weeks ago
Peru

Hi,

I'm using featureCounts (subread v2.0.2) to generate a count matrix for an RNAseq experiment. I have aligned paired-end .sam files sorted by read name and have specified the -p flag and the −−countReadPairs parameter (please see code below). When I run the command, I get ERROR: invalid parameter: '−−countReadPairs'. featureCounts will work just fine if the −−countReadPairs is not included but as I understand it, in version 2.0.2, −−countReadPairs must be included in order to get counts by fragments (as opposed to earlier versions where -p took care of 1) specifying if reads were paired-end & 2) that read pairs were to be counted). A note on the code below: I changed the path names to the .gtf, output .txt and sorted.sam files in this post for privacy reasons.

Thank you so much for your help! Sandra


featureCounts -T 4 -s 2 -p \ --countReadPairs \ -a /path/to/genes.gtf \ -t exon \ -g gene_id \ -o /path/to/featurecountsPE.txt /path/to/aligned/*.sorted.sam \ 2> /path/to/aligned/results/counts/featurecountsPE.screen-output1.log  subread featureCounts • 338 views ADD COMMENT 0 Entering edit mode Yang Liao ▴ 260 @yang-liao-6075 Last seen 1 day ago Australia Hi Sandra, I tested the source code version, the macOS version and Linux version of subread-2.0.2 using the same command as yours, and I didn't get this error message. The --countReadPairs option worked as expected. Your command line seems correct. Can you try this command: featureCounts -v  to see the version of featureCounts? Also, "−" and "-" are different symbols, and I saw you used the unicode "−" symbol in your post. Please be aware that some PDF files replace the ASCII symbol of "-" with the unicode symbol of "−". When you copy some options from the PDF file to your command, there is a chance that you actually copied the unicode "−" symbol, which isn't recognised by featureCounts as the prefix of options. So please make sure your command included the ASCII "-" symbol instead of the unicode "−" symbol as the prefix of the --countReadPairs option. Cheers, Yang ADD COMMENT 1 Entering edit mode Hi Yang, Thank you so much for your quick response. It was the ASCII/unicode difference. I ran featureCounts with no problems last nite. I thought I'd checked this before but clearly did not. I'm sorry to have sent you on a semi-wild goose chase testing the source code! I also ran the command featureCounts -v and got [smuroy@ln003 ~] featureCounts -v

featureCounts v2.0.2

If I may add a small suggestion. In the Subread users guide (Subread v2.0.2; 17 Jun 2021) Section 6.3, the example command line for paired-end reads is given as:

featureCounts -p -a annotation.gtf -t exon -g gene id
-o counts.txt mapping results PE.bam


Could you include the --countReadPairs for clarity?

Thanks again! Sandra

0
Entering edit mode

Thank you. We will have the relevant commands updated in the users guide.