'Invalid parameter' error to generate a count matrix using featurecounts
2
0
Entering edit mode
5 weeks ago
Shay • 0

Hi,

I am trying to run a count matrix using featurecounts but it is showing me 'invalid parameter' error with the file path to my bam files. I have checked and the files exist along with executable permissions. Here is my code:

$feature_counts -p -T 8 -a $gene_ann -o $count_out/count_matrix.txt $bam_dir/*_aligned.bam
ERROR: invalid parameter

Could someone please help me with that?

RNA-seq featurecounts • 462 views
ADD COMMENT
0
Entering edit mode
5 weeks ago
bk11 ★ 2.4k

Please check this link for the parameters settings. You have missed some of the parameters.

https://subread.sourceforge.net/featureCounts.html

ADD COMMENT
0
Entering edit mode

Thank you for the link! I had a look and updated the script:

# Run featureCounts to generate a count matrix
$featurecounts -p -O -M -T 8 -a $gene_ann -F GTF -t exon -g gene_id -o $count_out/count_matrix.txt $bam_dir/*.bam

However, it is still showing as : ERROR: invalid parameter:/path/to/file/SRR7008461_aligned.bam'

ADD REPLY
1
Entering edit mode

If you are using -p for paired end data then you should also use

--countReadPairs    Count read pairs (fragments) instead of reads. This option
                      is only applicable for paired-end reads.

I always list the BAM files individually with a space in between names. As Gordon Smyth said below the wild card does not work (*.bam).

Make sure all your variables expand to generate correct paths. It is odd to use a variable for a program name.

ADD REPLY
0
Entering edit mode
5 weeks ago
Gordon Smyth ★ 7.0k

One obvious issue is that the software is called featureCounts rather than feature_counts. Is feature_counts perhaps a customized script on your own system?

ADD COMMENT
0
Entering edit mode

Yep, the path for featurecounts is addressed as a variable 'feature_counts'.

ADD REPLY
0
Entering edit mode

I don't see anything in the featureCounts documentation that it accepts wild characters in file names.

ADD REPLY
0
Entering edit mode

Sorry, I think there is a confusion. I declared the path to where the featurecounts software is and called that variable feature_counts earlier on in the script. So, I was just calling that in this part of the script. I hope this makes more sense :)

This is my first time doing rnaseq analysis so a bit confused.

ADD REPLY

Login before adding your answer.

Traffic: 1640 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