I actually Gave this way and it worked but I don't see any counts. htseq-count –s reverse -q –f bam sample1.sorted.bam gencode.v27.primary_assembly.annotation.gtf > sample1_counts.txt
ENSG00000000003.14 0
ENSG00000000005.5 0
ENSG00000000419.12 0
ENSG00000000457.13 0
ENSG00000000460.16 0
ENSG00000000938.12 0
ENSG00000000971.15 0
ENSG00000001036.13 0
ENSG00000001084.10 0
ENSG00000001167.14 0
ENSG00000001460.17 0
Everything is 0. In the end of the file I see:
__no_feature 148352155
__ambiguous 344
__too_low_aQual 1986678
__not_aligned 2543185
__alignment_not_unique 91979962
No, you definitely didn't do anything wrong in the alignment. The problem is arising because the command line interpreter is not parsing correctly the BAM and the GFF argument that you provide. Sorry to ask but, is that the FULL command that you ran? Or did you rewrite it to show it to us?
Also, who installed the program? The sysadmin or is it installed by you with some kind of wrapper? Perhaps that is the reason why the arguments are not parsed despite being declared.
Another reason might be that you are specifying filenames that do not exist or require additional path information.
I didn't mention the paths here. The command for htseq-count I gave above is the right one. I didn't install the program.
So if for:
you check the path, the file is there? This is the cause of 90% of the issues, regardless of the experience of the researcher.