0001
0002
0003 function tests = blastPlusTests
0004 tests = functiontests(localfunctions);
0005 end
0006
0007 function testBlastPlus(testCase)
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 [ST, I]=dbstack('-completenames');
0022 ravenPath=fileparts(fileparts(fileparts(ST(I).file)));
0023
0024
0025 sourceDir = fileparts(which(mfilename));
0026 load([sourceDir,'/test_data/expBlastResults.mat'],'expBlastStructure','expBlastReport');
0027
0028 organismID='sce';
0029 fastaFile=fullfile(ravenPath,'testing','unit_tests','test_data','yeast_galactosidases.fa');
0030 modelIDs={'hsa' 'afv'};
0031 refFastaFiles={fullfile(ravenPath,'testing','unit_tests','test_data','human_galactosidases.fa') fullfile(ravenPath,'testing','unit_tests','test_data','aflavus_galactosidases.fa')};
0032
0033
0034
0035 [actBlastStructure,actBlastReport]=getBlast(organismID,fastaFile,modelIDs,refFastaFiles,true,true);
0036
0037
0038
0039 verifyEqual(testCase,actBlastReport.dbHashes,expBlastReport.dbHashes);
0040
0041
0042 actBlastReport.dbHashes.phr{1,1}=actBlastReport.dbHashes.phr{1,2};
0043 verifyNotEqual(testCase,actBlastReport.dbHashes,expBlastReport.dbHashes);
0044
0045
0046 verifyEqual(testCase,actBlastReport.blastTxtOutput,expBlastReport.blastTxtOutput);
0047
0048
0049 actBlastReport.blastTxtOutput='empty';
0050 verifyNotEqual(testCase,actBlastReport.blastTxtOutput,expBlastReport.blastTxtOutput);
0051
0052
0053 verifyEqual(testCase,actBlastStructure,expBlastStructure);
0054
0055
0056 actBlastStructure(1,1).toId=actBlastStructure(1,1).fromId;
0057 verifyNotEqual(testCase,actBlastStructure,expBlastStructure);
0058 end