Question: Please create code for this: Read in a table data using the readtable function. It is a 10000 x 39 table. The first column is
Please create code for this:
Read in a table "data" using the readtable function. It is a 10000 x 39 table. The first column is all the gene names. Each column after belongs to a patient. So there are 38 patients, for which 10000 gene expression values have been recorded.
First z-score your gene expression data by gene across patients. For this, you need to transpose the data. This is your normalized data.
Then, select a subset of the top 5% most variable genes for modeling. Use the un-normalized data and the var, prctile, and find functions for this.
As such:
V = var(un-normalized data);
P = prctile(V,95);
idx = find(V > P); % gives row numbers for top 5% of genes
Take the row numbers given by the idx to get the correct top 5% genes from the normalized data. Create a table "top5Percent" that holds the gene names for the top 5% and the normalized data for each gene.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
