time | calls | line |
---|
| | 1 | function [segmental_aneuploidy] = Load_dataset_information(projectDir)
|
| | 2 |
|
| | 3 | %%=========================================================================
|
| | 4 | % Load Common_ChARM.mat file for project : 'segmental_aneuploidy'.
|
| | 5 | %--------------------------------------------------------------------------
|
| 2 | 6 | if (exist([projectDir 'Common_ChARM.mat'],'file') ~= 0)
|
| 2 | 7 | dataFile = [projectDir 'Common_ChARM.mat'];
|
| 2 | 8 | fprintf(['\nLoading Common_ChARM.mat file for "' projectDir '" : ' dataFile '\n']);
|
| 2 | 9 | load(dataFile);
|
| | 10 | else
|
| | 11 | fprintf(['\nThe Common_ChARM.mat file for "' projectDir '" was not found.\n']);
|
| | 12 | fprintf(['Analyze your dataset with "analyze_ChARM.sh" first.\n']);
|
| | 13 | segmental_aneuploidy = [];
|
| | 14 | end;
|
| | 15 |
|
| | 16 | % %% ====================================================================
|
| | 17 | % % Get segmental aneuploidy data for experiment from "segmental_aneuploidy"
|
| | 18 | % % This allows for manual annotation of interesting segments of the genome which
|
| | 19 | % % differ in apparent copy number... this is not currently in use and is planned
|
| | 20 | % % to be replaced with an automated analysis function based on the ChARM algorithm.
|
| | 21 | % %----------------------------------------------------------------------
|
| | 22 | % if (exist(['links_dir/pileup_dir/' projectName '_segments.txt'],'file') ~= 0)
|
| | 23 | % fid = fopen(['links_dir/pileup_dir/' projectName '_segments.txt'],'r');
|
| | 24 | % % skip header line.
|
| | 25 | % discard = fgetl(fid);
|
| | 26 | % clear discard;
|
| | 27 | %
|
| | 28 | % % initialize some variables.
|
| | 29 | % i = 0;
|
| | 30 | % lines_analyzed = 0;
|
| | 31 | % counter = 0;
|
| | 32 | % segmental_aneuploidy = [];
|
| | 33 | %
|
| | 34 | % % procss each line of the file.
|
| | 35 | % while not (feof(fid))
|
| | 36 | % i = i+1;
|
| | 37 | % line = fgetl(fid);
|
| | 38 | % lines_analyzed = lines_analyzed+1;
|
| | 39 | %
|
| | 40 | % % take of interest data fields from each line.
|
| | 41 | % segAneu_chr = sscanf(line, '%s',1);
|
| | 42 | % segAneu_break = sscanf(line, '%s',2);
|
| | 43 | % for k = 1:length(sscanf(line,'%s',1));
|
| | 44 | % segAneu_break(1) = [];
|
| | 45 | % end;
|
| | 46 | %
|
| | 47 | % % interpret probeID to determine probe chromosome number and location.
|
| | 48 | % segmental_aneuploidy(i).chr = str2double(segAneu_chr);
|
| | 49 | % segmental_aneuploidy(i).break = str2double(segAneu_break);
|
| | 50 | % end;
|
| | 51 | % fclose(fid);
|
| | 52 | % else
|
| | 53 | % segmental_aneuploidy = [];
|
| | 54 | % end;
|
| | 55 |
|
| 2 | 56 | end
|