Team:Alberta/Project/Modeling/InvertList

%Outputs a list of genes that includes all genes in WithThis that are not also present in InvertThis. %Examples %EssentialGenes = InvertList(UnessentialModelGenes, model.genes) %InvertList(LiteratureGenes, 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 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)