Question: Using multiple gff files for featureCounts tool
0
gravatar for Za
18 months ago by
Za120
Za120 wrote:

Hi,

I have bam file, I want to use featureCounts to extract raw counts. for my organism, there are;

chromosome_1.gff
chromosome_2.gff
chromosome_2F.gff
chromosome_3.gff
chromosome_3F.gff
chromosome_4.gff
chromosome_5.gff
chromosome_6.gff
chromosome_BF.gff
chromosome_M.gff
chromosome_R.gff

I did

featureCounts -a chromosome_1.gff chromosome_2.gff chromosome_2F.gff chromosome_3.gff chromosome_3F.gff chromosome_4.gff chromosome_5.gff chromosome_6.gff chromosome_BF.gff chromosome_M.gff chromosome_R.gff -o counts SRR159344.txt SRR159344.bam

ERROR: invalid parameter: 'chromosome_2.gff'

Should one merge gff files or error is from something else????

ADD COMMENTlink modified 18 months ago by h.mon28k • written 18 months ago by Za120
2

Why not pasting all gff into a single file?

cat *gff > my_annotation.gff
ADD REPLYlink written 18 months ago by michael.ante3.5k

Thanks a lot, I think your code worked

ADD REPLYlink written 18 months ago by Za120

Sorry I obtained so; no raw read

# Program:featureCounts v1.6.2; Command:"featureCounts" "-t" "exon" "-g" "gene_id" "-a" "chromosome_1.gff" "-o" "counts.txt" "SRR1593424.bam" 
Geneid  Chr Start   End Strand  Length  SRR1593424.bam
    DDB0232428;DDB0232428;DDB0232428;DDB0232428;DDB0232428;DDB0232428;DDB0232428;DDB0232428;DDB0232428;DDB0232428;DDB0232428;DDB0232428;DDB0232428;DDB0232428;DDB0232428

You think why? I also tried my_annotation.gff suggested by you but outcome was the same

Running ==================================\\
||                                                                            ||
|| Load annotation file annotation.gff ...                                    ||

Warning: failed to find the gene identifier attribute in the 9th column of the provided GTF file.
The specified gene identifier attribute is 'gene_id' 
The attributes included in your GTF annotation are 'Parent=DDB0216437' 

||    Features : 61079                                                        ||
||    Meta-features : 1                                                       ||
||    Chromosomes/contigs : 11                                                ||
||                                                                            ||
|| Process SAM file SRR1593424.sam...                                         ||
||    Single-end reads are included.                                          ||
||    Assign reads to features...                                             ||
||    Total reads : 6709408                                                   ||
||    Successfully assigned reads : 6263556 (93.4%)                           ||
||    Running time : 0.11 minutes                                             ||
||                                                                            ||
||                         Read assignment finished.
ADD REPLYlink modified 18 months ago • written 18 months ago by Za120
1
gravatar for h.mon
18 months ago by
h.mon28k
Brazil
h.mon28k wrote:

The error message is clear:

Warning: failed to find the gene identifier attribute in the 9th column of the provided GTF file.

The specified gene identifier attribute is 'gene_id'

The attributes included in your GTF annotation are 'Parent=DDB0216437'

Try using -g Parent.

ADD COMMENTlink written 18 months ago by h.mon28k

Sorry, newly whatever I am trying on featureCounts I am being stoped by

dhcp179185:bin $ featureCounts -t exon -g gene_id -a annotation.gff -o counts.txt out2444_sorted.bam
-bash: featureCounts: command not found
dhcp179185:bin $ pwd
/volumes/subread/subread-1.6.2-source/bin
dhcp179185:bin$

I really can't figure out why :(

ADD REPLYlink written 18 months ago by Za120
1

How come you managed to run it before? You have to add featureCounts to the PATH environment variable, or call it with its full path:

/volumes/subread/subread-1.6.2-source/bin/featureCounts -t exon -g gene_id -a annotation.gff -o counts.txt out2444_sorted.bam

Or, if you are in the same folder as the executable, use the relative path:

./featureCounts -t exon -g gene_id -a annotation.gff -o counts.txt out2444_sorted.bam
ADD REPLYlink written 18 months ago by h.mon28k

Thanks a lot, adding ./ worked. Thanks again

ADD REPLYlink written 18 months ago by Za120

Sorry,

The rate of assignation is too low

                                                                         ||
|| Load annotation file annotation.gff ...                                    ||
||    Features : 61079                                                        ||
||    Meta-features : 29240                                                   ||
||    Chromosomes/contigs : 11                                                ||
||                                                                            ||
|| Process BAM file out2444_sorted.bam...                                     ||
||    Single-end reads are included.                                          ||
||    Assign reads to features...                                             ||
||    Total reads : 5429090                                                   ||
||    Successfully assigned reads : 298345 (5.5%)                             ||
||    Running time : 0.10 minutes

I edited gene_id with to Parent, based on the previous warning

What would a solution to resolve the rate of assignation?

ADD REPLYlink modified 18 months ago • written 18 months ago by Za120
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 2.3.0
Traffic: 1906 users visited in the last hour