How to separate this DNA sequence?

조회 수: 1 (최근 30일)
Nanda Lauzan
Nanda Lauzan 2012년 2월 17일
편집: Image Analyst 2013년 10월 16일
Hey everyone, I've the problem for separating this DNA sequence. for example :
sequence = 'AAATTTATGTGACAGTAG';
i've tried like this :
[one, two] = strtok(sequence)
but i've a result like this
one =
AAATTTATGTGACAGTAG
two =
Empty string: 1-by-0
i just want the result
one = AAA
two = TTT
three = ATG
four = TGA
five = CAG
six = TAG
and so on. can you all fix this? :)

채택된 답변

Ned Gulley
Ned Gulley 2012년 2월 17일
Here's a simple way to chunk your DNA up into codons. Then you can just pull the rows off to get each triplet.
>> sequence = 'AAATTTATGTGACAGTAG';
>> codons = sequence;
>> codons = reshape(codons(:),3,length(codons)/3)'
codons =
AAA
TTT
ATG
TGA
CAG
TAG
  댓글 수: 1
Nanda Lauzan
Nanda Lauzan 2012년 2월 18일
thanks Gulley for the answer :)
but if codons =
AAA
TTT
ATG
TGA
CAG
TAG
and change into this :
codons1 = AAA
codons2 = TTT
codons3 = ATG
codons4 = TGA
codons5 = CAG
codons6 = TAG ???

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for Raspberry Pi Hardware에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by