I recently tried to use bowtie2 and samtools to process some paired end data. I used bowtie2-build to index my reference genome, and used this index to align the paired end data. Once the alignment was over, i got the following on my STDOUT:
7659592 reads; of these:
7659592 (100.00%) were paired; of these:
136410 (1.78%) aligned concordantly 0 times
6927190 (90.44%) aligned concordantly exactly 1 time
595992 (7.78%) aligned concordantly >1 times
98.22% overall alignment rate
With this message, i assumed that the alignment is complete. I had used the -S option to obtain sam output file. So i tried to use samtools to sort and index the output file, but every time i get EOF not found error.
Please advise. Sameet
Actually, when i try to convert the
samfile to abamfile, i still get the same error.Have you used the -S flag on samtools, too? You have to tell samtools that you are using sam-files, too, like this:
samtools view -S bla.samor
samtools view -Sb in.sam outto convert to a bam-file called out.bamHi, thanks for the post. I figured it out. Its correct, the
samtoolsrequires abamfile!! I managed to get what i wanted. Thank you all for your help.