Team:Alberta/Project/Modeling/InvertList
From 2009.igem.org
(Difference between revisions)
(New page: %Creates a list of genes called InvertedList that includes all genes in %WithThis that are not present in InvertThis. %InvertThis = essgenes; %WithThis=model.genes; function [InvertedLi...) |
|||
Line 1: | Line 1: | ||
- | %Creates a list of genes called InvertedList that includes all genes in | + | %Creates a list of genes called InvertedList that includes all genes in |
- | %WithThis that are not present in InvertThis. | + | %WithThis that are not present in InvertThis. |
- | + | ||
- | %InvertThis = essgenes; | + | %InvertThis = essgenes; |
- | %WithThis=model.genes; | + | %WithThis=model.genes; |
- | + | ||
function [InvertedList] = InvertList(InvertThis, WithThis) | function [InvertedList] = InvertList(InvertThis, WithThis) | ||
InvertedList=cell(1); | InvertedList=cell(1); | ||
- | |||
- | |||
Match=zeros(size(WithThis)); | Match=zeros(size(WithThis)); | ||
for a=(1:length(InvertThis)) | for a=(1:length(InvertThis)) | ||
Line 26: | Line 24: | ||
end | end | ||
end | end | ||
- | |||
InvertedList=InvertedList'; | InvertedList=InvertedList'; | ||
SizeOfInvertedList=size(InvertedList) | SizeOfInvertedList=size(InvertedList) |
Revision as of 06:58, 2 October 2009
%Creates a list of genes called InvertedList that includes all genes in %WithThis that are not present in InvertThis. %InvertThis = essgenes; %WithThis=model.genes; function [InvertedList] = InvertList(InvertThis, WithThis) InvertedList=cell(1); Match=zeros(size(WithThis)); for a=(1:length(InvertThis)) for b=(1:length(WithThis)) if strcmp(InvertThis(a), WithThis(b)) == 1 Match(b)=1; end end a; end d=1; for c=(1:length(WithThis)) if Match(c)==0 InvertedList(d)=WithThis(c); d=d+1; end end InvertedList=InvertedList'; SizeOfInvertedList=size(InvertedList)