This is a test version of Biostars. For the public version, visit https://www.biostars.org.
using featureCounts in command line

Hi dudes,

I want to count the number of my reads that have been mapped to each gene, then I downloaded featureCounts from http://sourceforge.net/projects/subread/files/subread-1.4.6-p5/, untarred that then using my accepted_hits.sam and genes.gtf as input, I replaced the command from documentation like below:

Summarize a single-end read dataset using 5 threads:

featureCounts -T 5 -t exon -g gene_id -a annotation.gtf -o counts.txt mapping_results_SE.sam
[izadi@lbox161 Downloads]$ ls
subread-1.4.6-p5-source  subread-1.4.6-p5-source.tar.gz
[izadi@lbox161 Downloads]$ cd subread-1.4.6-p5-source
[izadi@lbox161 subread-1.4.6-p5-source]$ ls
LICENSE  README.txt  annotation  doc  ouput  src  test
[izadi@lbox161 subread-1.4.6-p5-source]$ cd src
[izadi@lbox161 src]$ ln -s /usr/data/nfs6/izadi/angel/ouput/
[izadi@lbox161 src]$ featureCounts -T 5 -t exon -g gene_id -a genes.gtf -o counts.txt accepted_hits.sam 
bash: featureCounts: command not found...

After untaring there no bin file there? do you know why?

[izadi@lbox161 izadi]$ tar -zxvf subread-1.4.6-p5-source.tar.gz

May you please read my command and detect my fault here?

Thank you

featurecounts

Ohhhh Pierre please,

I'm really helpless and this website is the only where I can get help because I'm totally alone with my problem

I'm totally alone with my problem

Just you, man command + Google and manuals. Start with googling:

  1. compiling a program from a source
  2. mastering ls and find command. Because you know, the secret incantation featureCounts can show its magic power only if it actually exist on your system and you invoke it with another short prayer which we call /path/to/your/executable or (but this is a real Black Magic) include some extra info in a book containing good spells, some like to call $PATH. Something like this (bash):

    export PATH=/path/to/directory/where/your/executable/is:$PATH

Trust me, these are good spells to know. Without them not even basic magic tricks are possible. And nobody will love you in Hogwarts.

Edit: removed space after "PATH= " + formatted as code

Thank you so much for your caring. Yes you are right

2 answers

Enter the src subdirectory under the home directory of the package and then issue the following command to build it on a Linux/unix computer:

make -f Makefile.Linux

then the bin will be created and Enter that subdirectory under the home directory, now run your command

as simple as eating a piece of cake but not cheese one!

Hi,

I am having the same error with feature count command .

please help me how did you resolved this .

Thank you

When you are in 'src' folder of subread program. Try referring your current directory. Example run like this

./featureCounts -T 5 -t exon -g gene_id -a genes.gtf -o counts.txt accepted_hits.sam

Log in to answer this question.