# Count files using htseq-count?

I am doing RNA-Seq data analysis using data available on SRA (SRR6047326). Samples are from the pig and they are paired. So, I did alignment using HISAT2.I used pig reference genome available on ENSEMBL. Then, I sorted .sam output files obtained from HISAT2. Now I am trying to get the count file using sorted sam file and it is not working. I am using annotated GTF file for pig which I downloaded from Ensembl.

I get count files using following commands, but all the counts are 0.

htseq-counts -i no myfile.sam genes.gtf>output.count


What is wrong here ? Are there any alternatives to htseq-count?

• Help us to help you. What does "not working" mean? Please post relevant error messages, if any. – fridaymeetssunday Apr 22 '18 at 8:57
• I runs well and gives me the count file. But there are zero counts for all the genes. At the end of count files it scores most of the genes are on --alignment_not_unique. – L R Joshi Apr 22 '18 at 15:31
• I tried kallisto and it seems to work fine with kallisto.I can see counts for the multiple genes in tsv file generated by kallisto. – L R Joshi Apr 22 '18 at 15:32
• Is that the actual command you ran? Because the "no" in -i no myfile.sam is odd, and since kallisto is returning some reasonable counts we can assume the issue with the htseq command and not the alignments (which was my 1st thought). – fridaymeetssunday Apr 22 '18 at 18:07
• Speaking of kallisto, it is also fine to use those results for your analysis, unless that there a specific reason to use htseq-count. – fridaymeetssunday Apr 22 '18 at 18:08

featureCounts -T 50 -C -p -t exon -g gene_id -a /run/media/data2/gencode.v21.annotation.gtf  -o PRIMARY_CELL.txt \$(ls *.bam | sort )