Hi,
I'm trying to extract counts for each gene from the sorted.bam file using htseq-count. But I end with an error. Command I used:
htseq-count –s reverse –f bam –q sample.sorted.bam gencode.v27.primary_assembly.annotation.gtf > sample1_counts.txt
I have this error:
/path/soft/apps/HTSeq/0.6.1p1-goolf-1.7.20-Python-2.7.11/bin/htseq-count: Error: Please provide two arguments.
Call with '-h' to get usage information.
For aligning reads to the genome I used Hisat2 tool. I didn't use any gtf file here. Following is the hisat2 command I used:
hisat2 -p 8 --dta --rna-strandness RF -x /grch38_snp_tran/genome_snp_tran -1 sample.1.fastq.gz -2 sample.2.fastq.gz | samtools view -Sb - > sample.bam; samtools sort -T /tmp/sample.sorted -o sample.sorted.bam sample.bam
Did I go wrong with the alignment step? Why htseq-count is showing the Error?
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.