SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help in converting Sam to Bam! zhacker Bioinformatics 15 04-21-2013 06:03 AM
Exclude chrM, chrUn* from reference // htseq-count warning on chrM ocs Bioinformatics 10 11-02-2011 11:21 AM
help on "truncated file", when converting sam to bam jianfeng.mao Bioinformatics 0 12-18-2010 03:03 AM
Converting data to bam file ajf Bioinformatics 1 04-24-2010 06:25 AM
Is anyone having trouble with tophat's SAM file -> cufflinks? peterlchang Bioinformatics 5 03-10-2010 07:17 PM

Reply
 
Thread Tools
Old 06-21-2011, 02:01 PM   #1
SEQanswer
Junior Member
 
Location: MD

Join Date: Jun 2011
Posts: 2
Default Trouble converting SAM to BAM, all 'chrM' recognized as '*'?

Hello
I'm trying to convert GERALD output, export.txt files, to BAM.
I used samtools export2sam.pl to convert export.txt to SAM but when using samtools -bt to convert SAM to BAM, all the chrM are being recognized as '*'.
such as
[sam_read1] reference 'chrM' is recognized as '*'.

Can anyone help on why are chrM's causing issues here?

Thanks in advance
Jay
SEQanswer is offline   Reply With Quote
Old 06-21-2011, 02:32 PM   #2
ECO
--Site Admin--
 
Location: SF Bay Area, CA, USA

Join Date: Oct 2007
Posts: 1,358
Default

Hey Jay,

Let me know what new username you'd like (via PM, or email admin@), as that one ain't gonna work.

Thanks,
-=Eric
ECO is offline   Reply With Quote
Old 06-22-2011, 11:34 AM   #3
SEQanswer
Junior Member
 
Location: MD

Join Date: Jun 2011
Posts: 2
Default

Issue solved, thanks for help SEQanswers.
SEQanswer is offline   Reply With Quote
Old 06-22-2011, 01:21 PM   #4
ECO
--Site Admin--
 
Location: SF Bay Area, CA, USA

Join Date: Oct 2007
Posts: 1,358
Default

Jay...posting your solution is helpful too...it may help others in the future.
ECO is offline   Reply With Quote
Old 07-16-2011, 08:14 PM   #5
jjpurwar
Junior Member
 
Location: Salt Lake City

Join Date: Jun 2011
Posts: 9
Default

How did you resolve this issue? Please help!
jjpurwar is offline   Reply With Quote
Old 07-17-2011, 11:34 AM   #6
jjpurwar
Junior Member
 
Location: Salt Lake City

Join Date: Jun 2011
Posts: 9
Default

I figured out the solution to my problem. Turns out that my sam file header had to be in the right format:

The first line needs to be header.
The second line needs to be a dummy read group line
The next lines need to contain the chromosomes and their lengths.

An example of a good header is as follows:

@HD VN:1.0 SO:unsorted
@RG ID:unknownReadGroup SM:unknownSample
@SQ SN:chrI AS:ce6_32r_index LN:15072421
@SQ SN:chrII AS:ce6_32r_index LN:15279323
@SQ SN:chrIII AS:ce6_32r_index LN:13783681
@SQ SN:chrIV AS:ce6_32r_index LN:17493785
@SQ SN:chrM AS:ce6_32r_index LN:13794
@SQ SN:chrV AS:ce6_32r_index LN:20919568
@SQ SN:chrX AS:ce6_32r_index LN:17718854

Once I deleted all the @SQ , @PG, @HD lines from my sam file and appended the above header text file to my sam file and tried to convert it to a bam - it worked beautifully.
jjpurwar is offline   Reply With Quote
Old 09-16-2013, 10:31 AM   #7
jdilts
Member
 
Location: Richmond, VA

Join Date: May 2012
Posts: 10
Default What was wrong with the original header?

What was wrong with the original header?
jdilts 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 02:59 AM.


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