how to train a gene dataset with a nearest shrunken centroid classifier?
It's a bit different from usual R, but if you check the help:

data: The input data. A list with components: x- an expression genes
in the rows, samples in the columns)

So in your case, you need to transpose the matrix:
mydata &lt;- list(
  x = t(x), 
  y = as.factor(y),
  geneid = as.character(1:nrow(x)),
  genenames = rownames(x)
)

As I don't have your amazing data, I can only use iris below:
pamr.train(list(x=t(iris[,1:4]),y=iris[,5]))

pamr.train(data = list(x = t(iris[, 1:4]), y = iris[, 5]))
   threshold nonzero errors
1   0.000    4       6     
2   0.841    4       7     
3   1.682    4       10    
4   2.523    4       11    
5   3.364    4       13    
6   4.205    4       18    
7   5.046    3       22    
8   5.887    3       23