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