text: user10653: I was trying to calculate t-statistics using Python's scipy and numpy as np-
  scipy.stats.ttest_ind_from_stats(
      NP.mean(x[['GSM1224991', 'GSM1224992']]),
      NP.std(x[['GSM1224991', 'GSM1224992']]),
      len(['GSM1224991', 'GSM1224992']),
      NP.mean(x[['GSM1224993', 'GSM1224994']]),
      NP.std(x[['GSM1224993', 'GSM1224994']]),
      len(['GSM1224993', 'GSM1224994']),
  )
  
  For example in the dataset given below, GSM1224991 & GSM1224992 are in first group and GSM1224993 & GSM1224994 form second group.
  ID_REF,GSM1224991,GSM1224992,GSM1224993,GSM1224994
  148000,6.436150368369428,6.499787040655854,4.430816798843313,3.0819099697950434
  
  Here is the calculation given in GEO2R analysis for the same reference but while I calculate t test it is 0.029630766122806237 instead of -0.33768 something as shown below.
  ID  adj.P.Val   P.Value t   B   logFC
  148000  1   0.001426    -9.44   -0.33768    -2.513
  
  How to calculate t-stat here? Or considering single row is wrong approach?
  
  user-1: That is not trivial. GEO2R uses the Bayesian linear model-based framework limma https://bioconductor.org/packages/release/bioc/html/limma.html for the analysis. I doubt you can easily and meaningfully implement the relevant code in Python without a major effort and notable background knowledge. The user guide https://bioconductor.org/packages/release/bioc/vignettes/limma/inst/doc/usersguide.pdf has background information plus links to the relevant papers. Don't try to analyze things by hand, use expert software. If it is not significant, well, then it is not significant. A 2vs2 comparison is strongly underpowered, therefore lack of DEGs are not unexpected, especially for microarrays.
  
original_text: 10653: <p>I was trying to calculate t-statistics using Python's <code>scipy</code> and <code>numpy as np</code>-</p>
  <pre class="lang-py prettyprint-override"><code>scipy.stats.ttest_ind_from_stats(
      NP.mean(x[['GSM1224991', 'GSM1224992']]),
      NP.std(x[['GSM1224991', 'GSM1224992']]),
      len(['GSM1224991', 'GSM1224992']),
      NP.mean(x[['GSM1224993', 'GSM1224994']]),
      NP.std(x[['GSM1224993', 'GSM1224994']]),
      len(['GSM1224993', 'GSM1224994']),
  )
  </code></pre>
  <p>For example in the dataset given below, <code>GSM1224991 &amp; GSM1224992</code> are in first group and <code>GSM1224993 &amp; GSM1224994</code> form second group.</p>
  <pre><code>ID_REF,GSM1224991,GSM1224992,GSM1224993,GSM1224994
  148000,6.436150368369428,6.499787040655854,4.430816798843313,3.0819099697950434
  </code></pre>
  <p>Here is the calculation given in GEO2R analysis for the same reference but while I calculate t test it is <code>0.029630766122806237</code> instead of <code>-0.33768</code> something as shown below.</p>
  <pre><code>ID  adj.P.Val   P.Value t   B   logFC
  148000  1   0.001426    -9.44   -0.33768    -2.513
  </code></pre>
  <p>How to calculate t-stat here? Or considering single row is wrong approach?</p>
   -1: <p>That is not trivial. GEO2R uses the Bayesian linear model-based framework <code>limma</code> <a href="https://bioconductor.org/packages/release/bioc/html/limma.html" rel="nofollow noreferrer">https://bioconductor.org/packages/release/bioc/html/limma.html</a> for the analysis. I doubt you can easily and meaningfully implement the relevant code in Python without a major effort and notable background knowledge. The user guide <a href="https://bioconductor.org/packages/release/bioc/vignettes/limma/inst/doc/usersguide.pdf" rel="nofollow noreferrer">https://bioconductor.org/packages/release/bioc/vignettes/limma/inst/doc/usersguide.pdf</a> has background information plus links to the relevant papers. Don't try to analyze things by hand, use expert software. If it is not significant, well, then it is not significant. A 2vs2 comparison is strongly underpowered, therefore lack of DEGs are not unexpected, especially for microarrays.</p>
  