/tools/regVariation/t_test_two_samples.xml

https://bitbucket.org/cistrome/cistrome-harvard/ · XML · 160 lines · 131 code · 29 blank · 0 comment · 0 complexity · 2b18cac37bf5d18d72a23bc79714a40c MD5 · raw file

  1. <tool id="t_test_two_samples" name="T Test for Two Samples" version="1.0.0">
  2. <description></description>
  3. <command interpreter="perl">
  4. t_test_two_samples.pl $inputFile1 $inputFile2 $inputTestSidedness3 $inputStandardDeviationEquality4 $outputFile1
  5. </command>
  6. <inputs>
  7. <param format="tabular" name="inputFile1" type="data" label="Select the first sample tabular file"/>
  8. <param format="tabular" name="inputFile2" type="data" label="Select the second sample tabular file"/>
  9. <param name="inputTestSidedness3" type="select" label="Choose the test sidedness:">
  10. <option value="two-sided">Two-sided</option>
  11. <option value="one-sided:_m1_less_than_m2">One-sided: m1 less than m2</option>
  12. <option value="one-sided:_m1_greater_than_m2">One-sided: m1 greater than m2</option>
  13. </param>
  14. <param name="inputStandardDeviationEquality4" type="select" label="Choose the standard deviation equality status of the two populations:">
  15. <option value="equal">Equal</option>
  16. <option value="unequal">Unequal</option>
  17. </param>
  18. </inputs>
  19. <outputs>
  20. <data format="text" name="outputFile1"/>
  21. </outputs>
  22. <tests>
  23. <test>
  24. <param name="inputFile1" value="sample1.tabular" ftype="tabular" />
  25. <param name="inputFile2" value="sample2.tabular" ftype="tabular" />
  26. <param name="inputTestSidedness3" value="Two-sided" />
  27. <param name="inputStandardDeviationEquality4" value="Equal" />
  28. <output name="outputFile1" file="t_test_result1.text" />
  29. </test>
  30. <test>
  31. <param name="inputFile1" value="sample1.tabular" ftype="tabular" />
  32. <param name="inputFile2" value="sample2.tabular" ftype="tabular" />
  33. <param name="inputTestSidedness3" value="Two-sided" />
  34. <param name="inputStandardDeviationEquality4" value="Unequal" />
  35. <output name="outputFile1" file="t_test_result2.text" />
  36. </test>
  37. <test>
  38. <param name="inputFile1" value="sample1.tabular" ftype="tabular" />
  39. <param name="inputFile2" value="sample2.tabular" ftype="tabular" />
  40. <param name="inputTestSidedness3" value="One-sided: m1 less than m2" />
  41. <param name="inputStandardDeviationEquality4" value="Equal" />
  42. <output name="outputFile1" file="t_test_result3.text" />
  43. </test>
  44. <test>
  45. <param name="inputFile1" value="sample1.tabular" ftype="tabular" />
  46. <param name="inputFile2" value="sample2.tabular" ftype="tabular" />
  47. <param name="inputTestSidedness3" value="One-sided: m1 less than m2" />
  48. <param name="inputStandardDeviationEquality4" value="Unequal" />
  49. <output name="outputFile1" file="t_test_result4.text" />
  50. </test>
  51. <test>
  52. <param name="inputFile1" value="sample1.tabular" ftype="tabular" />
  53. <param name="inputFile2" value="sample2.tabular" ftype="tabular"/>
  54. <param name="inputTestSidedness3" value="One-sided: m1 greater than m2" />
  55. <param name="inputStandardDeviationEquality4" value="Equal" />
  56. <output name="outputFile1" file="t_test_result5.text" />
  57. </test>
  58. <test>
  59. <param name="inputFile1" value="sample1.tabular" ftype="tabular" />
  60. <param name="inputFile2" value="sample2.tabular" ftype="tabular" />
  61. <param name="inputTestSidedness3" value="One-sided: m1 greater than m2" />
  62. <param name="inputStandardDeviationEquality4" value="Unequal" />
  63. <output name="outputFile1" file="t_test_result6.text" />
  64. </test>
  65. </tests>
  66. <help>
  67. .. class:: infomark
  68. **What it does**
  69. This program implements the non-pooled t-test for two samples where the alternative hypothesis is two-sided or one-sided. The program takes four inputs:
  70. - The first input file is a TABULAR format file representing the first sample and consisting of one column only.
  71. - The second input file is a TABULAR format file representing the first sample and consisting of one column only.
  72. - The third input is the sidedness of the t-test: either two-sided or, one-sided with m1 less than m2 or, one-sided with m1 greater than m2.
  73. - The fourth input is the equality status of the standard deviations of both populations.
  74. - The output file is a TXT file representing the result of the two-sample t-test.
  75. **Example**
  76. Let us have the first input file representing the first sample as follows::
  77. 5
  78. 4
  79. 8
  80. 6
  81. 7
  82. 2
  83. 1
  84. 1
  85. 0
  86. 6
  87. 4
  88. 5
  89. 7
  90. 5
  91. 3
  92. 2
  93. 5
  94. 8
  95. 7
  96. 6
  97. 4
  98. And the second input file representing the second sample as follows::
  99. 2
  100. 3
  101. 5
  102. 1
  103. 2
  104. 7
  105. 5
  106. 4
  107. 3
  108. 2
  109. 7
  110. 6
  111. 0
  112. 8
  113. 4
  114. 6
  115. 9
  116. 2
  117. 4
  118. 5
  119. 6
  120. Runnig the program and choosing "Two-sided" and "Equal" as parameters will give the following output::
  121. Two Sample t-test
  122. data: sample1 and sample2
  123. t = -0.3247, df = 40, p-value = 0.7471
  124. alternative hypothesis: true difference in means is not equal to 0
  125. 95 percent confidence interval:
  126. -1.720030 1.243839
  127. sample estimates:
  128. mean of x mean of y
  129. 4.333333 4.571429
  130. </help>
  131. </tool>