SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
samtools converting sam to bam filtering lre1234 Bioinformatics 6 10-30-2013 12:10 PM
Trouble converting SAM to BAM, all 'chrM' recognized as '*'? SEQanswer Bioinformatics 6 09-16-2013 09:31 AM
samtools converting sam>bam Kienan Bioinformatics 17 07-16-2013 09:01 AM
Help in converting Sam to Bam! zhacker Bioinformatics 15 04-21-2013 05:03 AM
Converting ELAND export -> SAM -> BAM knostrov Bioinformatics 10 10-17-2012 05:14 PM

Reply
 
Thread Tools
Old 03-18-2014, 11:02 AM   #1
akh22
Junior Member
 
Location: Pittsburgh

Join Date: May 2013
Posts: 7
Default Converting capital to small letter of Exon sequences in SAM/BAM

I'd appreciate if anybody could let me know any easy ways to convert capital to small letters of exon sequences in a sam/bam files or point to any relevant threads.

Thanks in advance.

Aki
akh22 is offline   Reply With Quote
Old 03-18-2014, 11:35 AM   #2
lindenb
Senior Member
 
Location: France

Join Date: Apr 2010
Posts: 143
Default

even if you could do this, I'm afraid tools like samtools would convert the bases to uppercase.
here is a test with samtools 1.18, everything is converted to uppercase.

Code:
@SQ	SN:ref	LN:45
@SQ	SN:ref2	LN:40
r001	163	ref	7	30	8M4I4M1D3M	=	37	39	TTAGATAAAGAGGATACTG	*	XX:B:S,12561,2,20,112
r002	0	ref	9	30	1S2I6M1P1I1P1I4M2I	*	0	0	AAAAGATAAGGGATAAA	*
r003	0	ref	9	30	5H6M	*	0	0	AGCTAA	*
r004	0	ref	16	30	6M14N1I5M	*	0	0	ATAGCTCTCAGC	*
r003	16	ref	29	30	6H5M	*	0	0	TAGGC	*
r001	83	ref	37	30	9M	=	7	-39	CAGCGCCAT	*
x1	0	ref2	1	30	20M	*	0	0	aggttttataaaacaaataa	????????????????????
x2	0	ref2	2	30	21M	*	0	0	ggttttataaaacaaataatt	?????????????????????
x3	0	ref2	6	30	9M4I13M	*	0	0	ttataaaacAAATaattaagtctaca	??????????????????????????
x4	0	ref2	10	30	25M	*	0	0	CaaaTaattaagtctacagagcaac	?????????????????????????
x5	0	ref2	12	30	24M	*	0	0	aaTaattaagtctacagagcaact	????????????????????????
x6	0	ref2	14	30	23M	*	0	0	Taattaagtctacagagcaacta	???????????????????????

and now piped into a simple samtools view:
Code:
~$ ~/samtools-0.1.18/samtools view -S ~/samtools-0.1.18/examples/toy.sam
[samopen] SAM header is present: 2 sequences.
r001	163	ref	7	30	8M4I4M1D3M	=	37	39	TTAGATAAAGAGGATACTG	*	XX:B:S,12561,2,20,112
r002	0	ref	9	30	1S2I6M1P1I1P1I4M2I	*	0	0	AAAAGATAAGGGATAAA	*
r003	0	ref	9	30	5H6M	*	0	0	AGCTAA	*
r004	0	ref	16	30	6M14N1I5M	*	0	0	ATAGCTCTCAGC	*
r003	16	ref	29	30	6H5M	*	0	0	TAGGC	*
r001	83	ref	37	30	9M	=	7	-39	CAGCGCCAT	*
x1	0	ref2	1	30	20M	*	0	0	AGGTTTTATAAAACAAATAA	????????????????????
x2	0	ref2	2	30	21M	*	0	0	GGTTTTATAAAACAAATAATT	?????????????????????
x3	0	ref2	6	30	9M4I13M	*	0	0	TTATAAAACAAATAATTAAGTCTACA	??????????????????????????
x4	0	ref2	10	30	25M	*	0	0	CAAATAATTAAGTCTACAGAGCAAC	?????????????????????????
x5	0	ref2	12	30	24M	*	0	0	AATAATTAAGTCTACAGAGCAACT	????????????????????????
x6	0	ref2	14	30	23M	*	0	0	TAATTAAGTCTACAGAGCAACTA	???????????????????????
lindenb is offline   Reply With Quote
Old 03-19-2014, 01:37 AM   #3
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480
Default

BAM files have no concept of case, they simply encode the base call as a 4 bit integer. While you could do this in a SAM file, it might break a lot of down-stream applications.
dpryan 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 12:10 AM.


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