I am struggling in conducting at test on a board of 1000 genes in 50 individuals divided into to groups (A and B). I have a dataset of 1000 genes of two groups of people (total individuals=50) group A = 30 (healthy) individuals & group B = 20 sick) individuals
I created a matrix where rows are genes and ind are columns. now I need to perform a t-test for all the genes and find the p values of my alternative hypothesis (not the null one): i)A<B, A>B and A=!B(not equal). threshold is 0.05 after FDR (which I must include)
I am struggling with the code since t-test differ on sensitivity and each of my approach returns a different result. The dummy data is as follows:
import pandas as pd
import numpy as np
# Generate data for group A (healthy individuals) & group B (sick individuals)
A = np.random.rand(30, 1000)
B = np.random.rand(20, 1000)
# Create dataframe for group A & B with genes as columns
Adf = pd.DataFrame(A, columns=[f'Gene_{i}' for i in range(1, num_genes + 1)])
Bdf = pd.DataFrame(B, columns=[f'Gene_{i}' for i in range(1, num_genes + 1)])
# Add a column indicating the group
Adf['Group'] = 'A'
Bdf['Group'] = 'B'
df = pd.concat([Adf, Bdf], ignore_index=True)
df.head()
Any ideas?
{}
button to format it as code. $\endgroup$