text: user1684: 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? 
  
  user285: I m not sure about htseq-counts but I would suggest go for featureCounts, I will update my answer and share the script/command. Give it a try 
  the command i use 
  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 )
  
  
original_text: 1684: <p>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.</p>
  
  <p>I get count files using following commands, but all the counts are 0.</p>
  
  <pre><code>htseq-counts -i no myfile.sam genes.gtf&gt;output.count
  </code></pre>
  
  <p>What is wrong here ? Are there any alternatives to htseq-count? </p>
   285: <p>I m not sure about htseq-counts but I would suggest go for featureCounts, I will update my answer and share the script/command. Give it a try </p>
  
  <p>the command i use </p>
  
  <pre><code>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 )
  </code></pre>
  