How to convert a nucleotide sequence data into complex number form such that base A= 1+i, G=1-i, C= -1-i and T=-1+i
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Shiwani
am 24 Mär. 2012
Kommentiert: nik hamizah hanif
am 21 Feb. 2015
I wish to convert a nucleotide sequence data in the form of nucleotide bases like [ACCCTTTTGGACT...] into a complex number representation such that A base can be replaced by complex number 1+i, base G can be replaced by 1-i, base C can be replaced by -1-i and T can be replaced by -1+i. though a direct conversion instruction nt2int(seq) converts the sequence into uint8 data. But i need the conversion in complex number form and also need to add the resulting sequence in cumulative form so that other mathematical operations can be performed on the resulting sequence.
0 Kommentare
Akzeptierte Antwort
Razvan
am 24 Mär. 2012
function J = convert2complex(S)
I = nt2int(S);
J = nan(size(I));
J(I == 1) = 1+1i;
J(I == 2) = -1-1i;
J(I == 3) = 1-1i;
J(I == 4) = -1+1i;
end
1 Kommentar
Weitere Antworten (1)
nik hamizah hanif
am 21 Feb. 2015
have you found how to do this?
function J = convert2complex(S) I = nt2int(S); J = nan(size(I)); J(I == 1) = 1+1i; J(I == 2) = -1-1i; J(I == 3) = 1-1i; J(I == 4) = -1+1i; end
above coding can be run at the M-script. then, how should i call the function back to convert the DNA sequence?
0 Kommentare
Siehe auch
Kategorien
Mehr zu Low-Level File I/O finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!