SEQanswers

Go Back   SEQanswers > General



Similar Threads
Thread Thread Starter Forum Replies Last Post
Alignment produces BAM file with sorted reads, but cannot see alignment alch Bioinformatics 11 04-14-2015 06:59 PM
I have a sorted BAM file, now what? KnowNothing2 Bioinformatics 1 10-17-2013 01:12 AM
How to get all contig boundaries from a sorted bam file dustar1986 Bioinformatics 3 09-30-2011 01:31 AM
BWA: specifying SAM/BAM file header fields before read alignment? nora Bioinformatics 3 12-04-2010 10:11 PM

Reply
 
Thread Tools
Old 10-27-2017, 09:02 AM   #1
gaurabSEQanswers
Junior Member
 
Location: Springfield. MO, USA

Join Date: Oct 2017
Posts: 2
Default BWA alignment- Indexing of sorted BAM file

Hi,

I have a problem with indexing the sorted BAM file in bwa alignment. I gave the command like this

samtools index ~/Desktop/Ruelliasorted.sorted.BAM and says that

EOF marker is absent. The input is probably truncated.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
[bam_index_core] Invalid BAM header.[bam_index_build2] fail to index the BAM file.

I need help to figure it out. Anybody out there???? Thanks in advance
gaurabSEQanswers is offline   Reply With Quote
Old 10-27-2017, 09:57 AM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,547
Default

See this old thread. How did you make your SAM/BAM file?
GenoMax is offline   Reply With Quote
Old 10-27-2017, 11:07 AM   #3
gaurabSEQanswers
Junior Member
 
Location: Springfield. MO, USA

Join Date: Oct 2017
Posts: 2
Default

bwa mem ~/Desktop/Tri.fasta ~/Desktop/R4A2R1.fastq ~/Desktop/R4A2R2.fastq >~/Desktop/RSAM.SAM for SAM file[

samtools view -b -S -o ~/Desktop/RBAM.BAM ~/Desktop/RSAM.SAM for BAM file

sorting- samtools sort ~/Desktop/RBAM.BAM >~/Desktop/RBAM.sorted.BAM

and i dont know how to figure out the problem in indexing.
gaurabSEQanswers is offline   Reply With Quote
Old 10-27-2017, 12:01 PM   #4
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,547
Default

What version of samtools are you using? Use the latest (v.1.5) if possible. Sorting with that version is done as follows
Code:
samtools sort -o sorted.bam original.bam
#then index
samtools index sorted.bam

Last edited by GenoMax; 10-27-2017 at 12:09 PM.
GenoMax is offline   Reply With Quote
Old 10-28-2017, 10:49 AM   #5
aiat8787
Junior Member
 
Location: cairo

Join Date: Oct 2017
Posts: 1
Default

Are you using the latest version?
مدونة المبدع
__________________
My personal blog: creative
aiat8787 is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 10:30 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO