Thread: HTseq
View Single Post
Old 09-06-2012, 07:02 AM   #3
narges
Member
 
Location: Finland

Join Date: Aug 2012
Posts: 29
Default

Quote:
Originally Posted by billstevens View Post
You didn't actually convert it to .sam. You should have wrote

samtools view accepted_hits.bam accepted_hits.sam

And then sort the acccepted_hits.sam file
Thank you, but I have used the same command, I mean like this :

samtools view accepted_hits.bam | htseq-count - /hg19/Annotation/Genes/genes.gtf > count.txt

for the single end dataset which did not ask for sorting and it worked.
Althigh I tried your advice and again there were more errors like :

[bam_index_load] fail to load BAM index.
[main_samview] random alignment retrieval only works for indexed BAM files.
And then I indexed the file : samtools index accepted_hits.bam

And then :

$ samtools view accepted_hits.bam.bai accepted_hits.sam
[bam_header_read] EOF marker is absent.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
[main_samview] fail to read the header from "accepted_hits.bam.bai".

The bam file I am using is the tophat output and I did not approach this problem of indexing and so on with this kind of result
narges is offline   Reply With Quote