Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Data Extraction and Standardization The data file 'gene _ expression.txt ' gives a table of gene expression values of genes in 5 replicates from an

Data Extraction and Standardization
The data file 'gene_expression.txt' gives a table of gene expression values of genes in 5 replicates from an RNA-seq experiment. Each line of the file gives expression values for one gene.
a/ Write a Python script that reads the file, standardizes the expression values and saves them in a new file.
a. Write a function for standardization, it should take a list of numbers and return their standardized values as a tuple or list.
b. Call the function for each gene in your script, save the standardized values as a table in your output file.
(Standardization means converting an X variable distributed with normal distribution into z-value, which is distributed by standard normal distribution. The formula is as follows:
z[i]=x[i]-meanxstdx
You can calculate mean and std of a gene by using:
import numpy as np
x=[x0,x1,x2,x3,x4,x5]#x0dotsx5 are expression values of a gene
mean x=np.mean(x)
stdx=np*std(x)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions