How to find genes associated with PC1 and PC2 after the PCA on microarray? I have run a PCA on my microarray data and found the clustering pattern for my samples. 
Now I need to find out the genes which are associated with first principal component and likewise till 4th PC.
How would I go about finding that?
 A: Use the predict function, for example:
GenesOnPCs = predict(prcomp(yourMAdata)))

A: Principle components constitute a new space for your data. You need to multiply your data points with each eigenvector representing the selected components to project them onto the new space. Then you can run a clustering algorithm to decide which points belong to which cluster, e.g. k-means if classes are well separated and globular.
A: I would recommend either plotting the features into the PCA space like in Fig. 1 of this tutorial (note that FactoMineR in R does this nicely) or, as others have recommended, run a clustering algorithm, then perform tests for differential expression on the results of the clusters.
A: In Python I would do this the following way:
from sklearn import decomposition
from pandas import DataFrame

# assuming training data is a pandas dataframe named 'train'
# training the PCA
pca = decomposition.PCA()
pca.fit(train)

# getting the weights for original parameters
for i in range(0,4):
    featureWeights = list(pca.components_[i])
    weights = DataFrame(data = featureWeights)
    filename = 'principal_component_' + str(i) + '.txt'
    weights.to_csv(filename, sep = '\t')

Then you get the weights how much each original component contributes into the new component in four .txt files. You can take the genes that have an absolute value above an arbitrary threshold.
