-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcomseq.m
More file actions
33 lines (29 loc) · 704 Bytes
/
Copy pathcomseq.m
File metadata and controls
33 lines (29 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
function [s] = comseq(s0)
%COMSEQ - Return complement of sequences
%
% Syntax: [s] = comseq(s0)
%
% Inputs:
% s0 - Sequences
%
% Outputs:
% s - New sequences
%
% See also: REVSEQ, REVCOMSEQ
% Molecular Biology and Evolution Toolbox (MBEToolbox)
% Author: James Cai
% Email: jcai@tamu.edu
% Website: http://bioinformatics.org/mbetoolbox/
%
% $LastChangedDate: 2013-01-05 12:04:29 -0600 (Sat, 05 Jan 2013) $
% $LastChangedRevision: 327 $
% $LastChangedBy: jcai $
if (isstruct(s0))
if ~(isvalidaln(s0,'NUCLEOTIDE'))
error ('ERROR: Not nucleotide sequence.')
end
s0=s0.seq;
end
s=s0;
a=find(s==1); c=find(s==2); g=find(s==3); t=find(s==4);
s(a)=4; s(c)=3; s(g)=2; s(t)=1;