This is a test version of Biostars. For the public version, visit https://www.biostars.org.
htseq-count error while bam file was sorted by name

Hi. I have encountered error while working on htseq-count. I have studied this error on many form. The solution to this error was sort the bam file by name. I did same by using this command as

samtools sort -n myfile_align.bam -o myfile_sortedn.bam

then i run the comand on htseq as

htseq-count -f bam -r name -i gene_id -s no -t exon myfile_sortedn.bam reference.gtf  > myfile_htseq_count.txt

I got the same wornings again after sorting as

Warning: Read NS500786:42:HW75GBGXX:1:11101:1523:3911 claims to have an aligned mate which could not be found in an adjacent line.

Warning: 1301378 reads with missing mate encountered.54666717 SAM alignment pairs processed.

Can you please tell me other solution to remove this warnings.

rna-seq assembly alignment software error r
claims to have an aligned mate which could not be found in an adjacent line.

Some mates are missing. Did you filter the BAM file in any fashion? You can try

samtools sort -n myfile_align.bam | samtools fixmate - myfile_sortedn.bam

to remove the paired-end flag in case the read is a singleton.

0 answers

No answers yet.

Log in to answer this question.