I am trying to generate a count table after aligning my CLIP-seq results to a genome index. I have been using several online tutorials, but I am running into an issue when using featureCounts from bioconda subread. I have tried referencing a folder containing BAM files as well as single BAM files for my input, but I keep getting the same invalid parameters error:
featureCounts -a Mus_musculus.GRCm39.109.gtf -o count.out -T 8 bams/*.bam
ERROR: invalid parameter: 'bams/SRR202.fastqAligned.sortedByCoord.out.bam'
Or when I move the bam files to the folder I am in and try a single input:
featureCounts -a Mus_musculus.GRCm39.109.gtf -o count.out -T 8 SRR202fastqAligned.sortedByCoord.out.bam
ERROR: invalid parameter: 'SRR202.fastqAligned.sortedByCoord.out.bam'
What's the featureCounts version you're using? Can you run
featureCounts -h
and show the output please?That is odd. What is the output of this command
file SRR202fastqAligned.sortedByCoord.out.bam
?You should see something like
Edit: Unlike @rfran010 I don't see any problems with the command, switching the order of options etc. Surprisingly
*.bam
specification picks up all the files automatically (learned something new). I am using v.2.0.3.I don't think it's a problem with the content of the file or its existence - it's like featureCounts expects a parameter and errors out weirdly.
It seems like there's an issue with you bam file. How does it look?
on version 2.0.6, if I run your command, I get the same error. If I swap the bam file for one of my own, it will start, give the subread output, but then fail to open the annotation file
Hello,
I am running into a similar issue. I am doing RNA seq on cancer cell lines. Workflow: I got back the fastq.gz files, used trimmomatic for trimming, then mapping with STAR, then conversion to BAM, then sorting, all without any issues reported, and then tried running featurecounts. I have done the same thing for various samples in one go, but with this bam file (and other bam files from this particular cell line) I have the following issue:
commandline:
.sh file:
Slurm content:
Again, it has worked for all my files (with other cell lines) except for the files with this cell line.
Does anyone know what might be going on? I am using featureCounts v2.0.3. Any help is much appreciated. Please let me know if you need further information.
BW
I wonder if the
-
in output name is being interpreted as an option. Can you try replacing the-
with_
and see if it helps?I don't remember for v.2.0.3 but for recent version you need to add
--countReadPairs
in addition to-p
to count fragments with PE data.Are you sure the file
90-8_D21d_R2_sorted_Aligned.out.bam
exists? Just going with an educated guess - should the bam file even have R1/R2 in its name?