Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all,...
-
Upload
tobias-newman -
Category
Documents
-
view
216 -
download
1
Transcript of Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all,...
![Page 1: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/1.jpg)
Yuval Hart, Weizmann 2010© 1
Introduction to Matlab & Data Analysis
Final Project: That’s all, Folks!
![Page 2: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/2.jpg)
2
Outline
Parsing files Efficient programming - vectorization Correlation coefficients Passing extra parameters Image plotting Curve Fitting & Optimization Figure handling
![Page 3: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/3.jpg)
3
“Rotation in 60 minutes”
![Page 4: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/4.jpg)
4
Rotation in 60 minutes:
During the past month you’ve measured promoter activity of 20 genes.
Your PI wants you to present your results at the next group meeting.
![Page 5: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/5.jpg)
5
To Do List
Get the sequences of the genes from a GenBank+Fasta files and calculate GC content
Display all correlation coefficients of the measured PA and relation to GC content
Find for the highest 4 genes, how correlation decays with distance from initial gene in the pathway
![Page 6: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/6.jpg)
6
To Do List
Get the sequences of the genes from a GenBank+Fasta files and calculate GC content
Display all correlation coefficients of the measured PA and relation to GC content
Find for the highest 4 genes, how correlation decays with distance from initial gene in the pathway
![Page 7: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/7.jpg)
7
GenBank file format
![Page 8: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/8.jpg)
8
Step 3: Attach every gene name with its DNA sequence
Build the structure with all needed fields:
% Build the structure Genes with the desired genes and their data: % name, startPosition, endPosition, sequence, complement (1/0), GCcontent% This is also the way to preallocate for structures:% Genes(1,sum(indGeneList))=struct( 'name', [], 'complement', [], 'sequence',[],...% 'StartPosition',[],'EndPosition',[],'GCcontent',1);
Genes=struct('name',geneNames(indGeneList),…'complement', num2cell(indComplement(indGeneList)'),... 'StartPosition',CDSpositionStartEndCelled(indGeneList,1)',…'EndPosition',CDSpositionStartEndCelled(indGeneList,2)',...'sequence',seq,'GCcontent',GCcontent);a=Genes;Note: Structures are assigned one by one only with
cell arrays
![Page 9: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/9.jpg)
9
To Do List
Get the sequences of the genes from a GenBank+Fasta files and calculate GC content
Display all correlation coefficients of the measured PA and relation to GC content
Find for the highest 4 genes, how correlation decays with distance from initial gene in the pathway
![Page 10: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/10.jpg)
10
Calculate and plot Correlation Matrix
Load the list of genes and measurements% Input:% measurement mat file contains:% geneList - a cell array of the genes Names% measurements - a matrix of 20 genes measurements at 1001 time points% GenesGCcontent - a vector of the genes GCcontent values
%measurements has a row for each gene containing its measurements through%1001 time points and the geneList namesload measurements
![Page 11: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/11.jpg)
11
Plot GC content and mean PA dependence
Plot fit results upon the previous graph:
Note: Smoothed data can lower the effect of outliers
![Page 12: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/12.jpg)
12
Calculate and plot Correlation Matrix
Calculate and display the corr. matrix
![Page 13: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/13.jpg)
13
To Do List
Get the sequences of the genes from a GenBank+Fasta files and calculate GC content
Display all correlation coefficients of the measured PA and relation to GC content
Find for the highest 4 genes, how correlation decays with distance from initial gene in the pathway
![Page 14: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/14.jpg)
14
Step 2: Fit correlations to the desired function
Using anonymous function to add more Parameters and fitting using lsqcurvefit:
function y_hat=FittingCurveExpGuess(c,x,init)% This assumes an exponential decreasing curvey_hat=init+c(1)*exp(c(2).*x);
initDis=-0.1;c0=[.7 0.1]; %assigning the initial values for the fit searchparamfunc = @(c,x)FittingCurveExpGuess(c,x,initDis); %def. of the anonymous functionExpParam=lsqcurvefit(paramfunc,c0,XdataPoints,correl,[0 -1],[1 1],options);
Function name
Initial guess
X data
Y data
Lower bound
upper bound
![Page 15: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/15.jpg)
15
Step 3: Plot the correlation data and fit
![Page 16: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/16.jpg)
16
Best of Luck in the Group Meeting !
![Page 17: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/17.jpg)
17
Best of Luck in the Group Meeting !
![Page 18: Yuval Hart, Weizmann 2010© 1 Introduction to Matlab & Data Analysis Final Project: That’s all, Folks!](https://reader035.fdocuments.us/reader035/viewer/2022062720/56649f175503460f94c2e1c6/html5/thumbnails/18.jpg)
18
This is the end, my friend, the end
"Louis, I think this is the beginning of a beautiful friendship."