Question: htseq-count error while bam file was sorted by name
0
gravatar for fatimarasool135
10 weeks ago by
fatimarasool13540 wrote:

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.

ADD COMMENTlink written 10 weeks ago by fatimarasool13540
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.

ADD REPLYlink modified 10 weeks ago • written 10 weeks ago by ATpoint26k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1242 users visited in the last hour