tinygwas 0.2__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (404) hide show
  1. tinygwas-0.2.1/CMakeLists.txt +14 -0
  2. tinygwas-0.2.1/MANIFEST.in +6 -0
  3. {tinygwas-0.2 → tinygwas-0.2.1}/PKG-INFO +1 -1
  4. {tinygwas-0.2 → tinygwas-0.2.1}/README.md +4 -0
  5. {tinygwas-0.2 → tinygwas-0.2.1}/setup.py +1 -1
  6. tinygwas-0.2.1/src/FileUtils.cpp +45 -0
  7. tinygwas-0.2.1/src/FileUtils.h +17 -0
  8. tinygwas-0.2.1/src/Utils.cpp +1 -0
  9. tinygwas-0.2.1/src/Utils.h +15 -0
  10. tinygwas-0.2.1/src/main.cpp +283 -0
  11. tinygwas-0.2.1/thirdparty/Eigen/Cholesky +45 -0
  12. tinygwas-0.2.1/thirdparty/Eigen/CholmodSupport +48 -0
  13. tinygwas-0.2.1/thirdparty/Eigen/Core +384 -0
  14. tinygwas-0.2.1/thirdparty/Eigen/Dense +7 -0
  15. tinygwas-0.2.1/thirdparty/Eigen/Eigen +2 -0
  16. tinygwas-0.2.1/thirdparty/Eigen/Eigenvalues +60 -0
  17. tinygwas-0.2.1/thirdparty/Eigen/Geometry +59 -0
  18. tinygwas-0.2.1/thirdparty/Eigen/Householder +29 -0
  19. tinygwas-0.2.1/thirdparty/Eigen/IterativeLinearSolvers +48 -0
  20. tinygwas-0.2.1/thirdparty/Eigen/Jacobi +32 -0
  21. tinygwas-0.2.1/thirdparty/Eigen/KLUSupport +41 -0
  22. tinygwas-0.2.1/thirdparty/Eigen/LU +49 -0
  23. tinygwas-0.2.1/thirdparty/Eigen/MetisSupport +35 -0
  24. tinygwas-0.2.1/thirdparty/Eigen/OrderingMethods +70 -0
  25. tinygwas-0.2.1/thirdparty/Eigen/PaStiXSupport +49 -0
  26. tinygwas-0.2.1/thirdparty/Eigen/PardisoSupport +35 -0
  27. tinygwas-0.2.1/thirdparty/Eigen/QR +50 -0
  28. tinygwas-0.2.1/thirdparty/Eigen/QtAlignedMalloc +39 -0
  29. tinygwas-0.2.1/thirdparty/Eigen/SPQRSupport +34 -0
  30. tinygwas-0.2.1/thirdparty/Eigen/SVD +50 -0
  31. tinygwas-0.2.1/thirdparty/Eigen/Sparse +34 -0
  32. tinygwas-0.2.1/thirdparty/Eigen/SparseCholesky +37 -0
  33. tinygwas-0.2.1/thirdparty/Eigen/SparseCore +69 -0
  34. tinygwas-0.2.1/thirdparty/Eigen/SparseLU +50 -0
  35. tinygwas-0.2.1/thirdparty/Eigen/SparseQR +36 -0
  36. tinygwas-0.2.1/thirdparty/Eigen/StdDeque +27 -0
  37. tinygwas-0.2.1/thirdparty/Eigen/StdList +26 -0
  38. tinygwas-0.2.1/thirdparty/Eigen/StdVector +27 -0
  39. tinygwas-0.2.1/thirdparty/Eigen/SuperLUSupport +64 -0
  40. tinygwas-0.2.1/thirdparty/Eigen/UmfPackSupport +40 -0
  41. tinygwas-0.2.1/thirdparty/Eigen/src/Cholesky/LDLT.h +688 -0
  42. tinygwas-0.2.1/thirdparty/Eigen/src/Cholesky/LLT.h +558 -0
  43. tinygwas-0.2.1/thirdparty/Eigen/src/Cholesky/LLT_LAPACKE.h +99 -0
  44. tinygwas-0.2.1/thirdparty/Eigen/src/CholmodSupport/CholmodSupport.h +682 -0
  45. tinygwas-0.2.1/thirdparty/Eigen/src/Core/ArithmeticSequence.h +413 -0
  46. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Array.h +417 -0
  47. tinygwas-0.2.1/thirdparty/Eigen/src/Core/ArrayBase.h +226 -0
  48. tinygwas-0.2.1/thirdparty/Eigen/src/Core/ArrayWrapper.h +209 -0
  49. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Assign.h +90 -0
  50. tinygwas-0.2.1/thirdparty/Eigen/src/Core/AssignEvaluator.h +1000 -0
  51. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Assign_MKL.h +178 -0
  52. tinygwas-0.2.1/thirdparty/Eigen/src/Core/BandMatrix.h +353 -0
  53. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Block.h +448 -0
  54. tinygwas-0.2.1/thirdparty/Eigen/src/Core/BooleanRedux.h +162 -0
  55. tinygwas-0.2.1/thirdparty/Eigen/src/Core/CommaInitializer.h +164 -0
  56. tinygwas-0.2.1/thirdparty/Eigen/src/Core/ConditionEstimator.h +175 -0
  57. tinygwas-0.2.1/thirdparty/Eigen/src/Core/CoreEvaluators.h +1738 -0
  58. tinygwas-0.2.1/thirdparty/Eigen/src/Core/CoreIterators.h +132 -0
  59. tinygwas-0.2.1/thirdparty/Eigen/src/Core/CwiseBinaryOp.h +183 -0
  60. tinygwas-0.2.1/thirdparty/Eigen/src/Core/CwiseNullaryOp.h +1001 -0
  61. tinygwas-0.2.1/thirdparty/Eigen/src/Core/CwiseTernaryOp.h +197 -0
  62. tinygwas-0.2.1/thirdparty/Eigen/src/Core/CwiseUnaryOp.h +103 -0
  63. tinygwas-0.2.1/thirdparty/Eigen/src/Core/CwiseUnaryView.h +132 -0
  64. tinygwas-0.2.1/thirdparty/Eigen/src/Core/DenseBase.h +701 -0
  65. tinygwas-0.2.1/thirdparty/Eigen/src/Core/DenseCoeffsBase.h +685 -0
  66. tinygwas-0.2.1/thirdparty/Eigen/src/Core/DenseStorage.h +602 -0
  67. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Diagonal.h +258 -0
  68. tinygwas-0.2.1/thirdparty/Eigen/src/Core/DiagonalMatrix.h +391 -0
  69. tinygwas-0.2.1/thirdparty/Eigen/src/Core/DiagonalProduct.h +28 -0
  70. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Dot.h +318 -0
  71. tinygwas-0.2.1/thirdparty/Eigen/src/Core/EigenBase.h +160 -0
  72. tinygwas-0.2.1/thirdparty/Eigen/src/Core/ForceAlignedAccess.h +150 -0
  73. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Fuzzy.h +155 -0
  74. tinygwas-0.2.1/thirdparty/Eigen/src/Core/GeneralProduct.h +465 -0
  75. tinygwas-0.2.1/thirdparty/Eigen/src/Core/GenericPacketMath.h +912 -0
  76. tinygwas-0.2.1/thirdparty/Eigen/src/Core/GlobalFunctions.h +194 -0
  77. tinygwas-0.2.1/thirdparty/Eigen/src/Core/IO.h +258 -0
  78. tinygwas-0.2.1/thirdparty/Eigen/src/Core/IndexedView.h +237 -0
  79. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Inverse.h +117 -0
  80. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Map.h +171 -0
  81. tinygwas-0.2.1/thirdparty/Eigen/src/Core/MapBase.h +310 -0
  82. tinygwas-0.2.1/thirdparty/Eigen/src/Core/MathFunctions.h +2029 -0
  83. tinygwas-0.2.1/thirdparty/Eigen/src/Core/MathFunctionsImpl.h +191 -0
  84. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Matrix.h +565 -0
  85. tinygwas-0.2.1/thirdparty/Eigen/src/Core/MatrixBase.h +547 -0
  86. tinygwas-0.2.1/thirdparty/Eigen/src/Core/NestByValue.h +85 -0
  87. tinygwas-0.2.1/thirdparty/Eigen/src/Core/NoAlias.h +109 -0
  88. tinygwas-0.2.1/thirdparty/Eigen/src/Core/NumTraits.h +335 -0
  89. tinygwas-0.2.1/thirdparty/Eigen/src/Core/PartialReduxEvaluator.h +232 -0
  90. tinygwas-0.2.1/thirdparty/Eigen/src/Core/PermutationMatrix.h +605 -0
  91. tinygwas-0.2.1/thirdparty/Eigen/src/Core/PlainObjectBase.h +1128 -0
  92. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Product.h +191 -0
  93. tinygwas-0.2.1/thirdparty/Eigen/src/Core/ProductEvaluators.h +1179 -0
  94. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Random.h +218 -0
  95. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Redux.h +515 -0
  96. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Ref.h +381 -0
  97. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Replicate.h +142 -0
  98. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Reshaped.h +454 -0
  99. tinygwas-0.2.1/thirdparty/Eigen/src/Core/ReturnByValue.h +119 -0
  100. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Reverse.h +217 -0
  101. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Select.h +164 -0
  102. tinygwas-0.2.1/thirdparty/Eigen/src/Core/SelfAdjointView.h +365 -0
  103. tinygwas-0.2.1/thirdparty/Eigen/src/Core/SelfCwiseBinaryOp.h +47 -0
  104. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Solve.h +188 -0
  105. tinygwas-0.2.1/thirdparty/Eigen/src/Core/SolveTriangular.h +235 -0
  106. tinygwas-0.2.1/thirdparty/Eigen/src/Core/SolverBase.h +168 -0
  107. tinygwas-0.2.1/thirdparty/Eigen/src/Core/StableNorm.h +251 -0
  108. tinygwas-0.2.1/thirdparty/Eigen/src/Core/StlIterators.h +463 -0
  109. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Stride.h +116 -0
  110. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Swap.h +68 -0
  111. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Transpose.h +464 -0
  112. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Transpositions.h +386 -0
  113. tinygwas-0.2.1/thirdparty/Eigen/src/Core/TriangularMatrix.h +1001 -0
  114. tinygwas-0.2.1/thirdparty/Eigen/src/Core/VectorBlock.h +96 -0
  115. tinygwas-0.2.1/thirdparty/Eigen/src/Core/VectorwiseOp.h +784 -0
  116. tinygwas-0.2.1/thirdparty/Eigen/src/Core/Visitor.h +381 -0
  117. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AVX/Complex.h +438 -0
  118. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AVX/MathFunctions.h +228 -0
  119. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AVX/PacketMath.h +1579 -0
  120. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AVX/TypeCasting.h +115 -0
  121. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AVX512/Complex.h +455 -0
  122. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AVX512/MathFunctions.h +425 -0
  123. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AVX512/PacketMath.h +2309 -0
  124. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AVX512/TypeCasting.h +89 -0
  125. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AltiVec/Complex.h +483 -0
  126. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AltiVec/MathFunctions.h +90 -0
  127. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +2934 -0
  128. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +221 -0
  129. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +637 -0
  130. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AltiVec/PacketMath.h +2702 -0
  131. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/CUDA/Complex.h +259 -0
  132. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/Default/BFloat16.h +707 -0
  133. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/Default/ConjHelper.h +29 -0
  134. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +1655 -0
  135. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +114 -0
  136. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/Default/Half.h +942 -0
  137. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/Default/Settings.h +49 -0
  138. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/Default/TypeCasting.h +120 -0
  139. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/GPU/MathFunctions.h +103 -0
  140. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/GPU/PacketMath.h +1685 -0
  141. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/GPU/TypeCasting.h +80 -0
  142. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/HIP/hcc/math_constants.h +23 -0
  143. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/MSA/Complex.h +720 -0
  144. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/MSA/MathFunctions.h +387 -0
  145. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/MSA/PacketMath.h +1237 -0
  146. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/NEON/Complex.h +672 -0
  147. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +183 -0
  148. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/NEON/MathFunctions.h +75 -0
  149. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/NEON/PacketMath.h +4675 -0
  150. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/NEON/TypeCasting.h +1419 -0
  151. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SSE/Complex.h +470 -0
  152. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SSE/MathFunctions.h +199 -0
  153. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SSE/PacketMath.h +1505 -0
  154. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SSE/TypeCasting.h +142 -0
  155. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SVE/MathFunctions.h +44 -0
  156. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SVE/PacketMath.h +756 -0
  157. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SVE/TypeCasting.h +49 -0
  158. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SYCL/InteropHeaders.h +232 -0
  159. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SYCL/MathFunctions.h +301 -0
  160. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SYCL/PacketMath.h +670 -0
  161. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h +694 -0
  162. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SYCL/TypeCasting.h +85 -0
  163. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/ZVector/Complex.h +525 -0
  164. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/ZVector/MathFunctions.h +233 -0
  165. tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/ZVector/PacketMath.h +1063 -0
  166. tinygwas-0.2.1/thirdparty/Eigen/src/Core/functors/AssignmentFunctors.h +177 -0
  167. tinygwas-0.2.1/thirdparty/Eigen/src/Core/functors/BinaryFunctors.h +541 -0
  168. tinygwas-0.2.1/thirdparty/Eigen/src/Core/functors/NullaryFunctors.h +189 -0
  169. tinygwas-0.2.1/thirdparty/Eigen/src/Core/functors/StlFunctors.h +136 -0
  170. tinygwas-0.2.1/thirdparty/Eigen/src/Core/functors/TernaryFunctors.h +25 -0
  171. tinygwas-0.2.1/thirdparty/Eigen/src/Core/functors/UnaryFunctors.h +1131 -0
  172. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/GeneralBlockPanelKernel.h +2677 -0
  173. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrix.h +517 -0
  174. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +317 -0
  175. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +145 -0
  176. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +124 -0
  177. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/GeneralMatrixVector.h +518 -0
  178. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h +136 -0
  179. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/Parallelizer.h +180 -0
  180. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +544 -0
  181. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +295 -0
  182. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/SelfadjointMatrixVector.h +262 -0
  183. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h +118 -0
  184. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/SelfadjointProduct.h +133 -0
  185. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/SelfadjointRank2Update.h +94 -0
  186. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/TriangularMatrixMatrix.h +472 -0
  187. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +317 -0
  188. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/TriangularMatrixVector.h +350 -0
  189. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h +255 -0
  190. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/TriangularSolverMatrix.h +337 -0
  191. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +167 -0
  192. tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/TriangularSolverVector.h +148 -0
  193. tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/BlasUtil.h +666 -0
  194. tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/ConfigureVectorization.h +512 -0
  195. tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/Constants.h +563 -0
  196. tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/DisableStupidWarnings.h +106 -0
  197. tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/ForwardDeclarations.h +322 -0
  198. tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/IndexedViewHelper.h +186 -0
  199. tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/IntegralConstant.h +272 -0
  200. tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/MKL_support.h +137 -0
  201. tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/Macros.h +1454 -0
  202. tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/Memory.h +1152 -0
  203. tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/Meta.h +807 -0
  204. tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/NonMPL2.h +3 -0
  205. tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/ReenableStupidWarnings.h +31 -0
  206. tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/ReshapedHelper.h +51 -0
  207. tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/StaticAssert.h +221 -0
  208. tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/SymbolicIndex.h +293 -0
  209. tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/XprHelper.h +868 -0
  210. tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/ComplexEigenSolver.h +346 -0
  211. tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/ComplexSchur.h +462 -0
  212. tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h +91 -0
  213. tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/EigenSolver.h +622 -0
  214. tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +418 -0
  215. tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +226 -0
  216. tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/HessenbergDecomposition.h +374 -0
  217. tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +158 -0
  218. tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/RealQZ.h +657 -0
  219. tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/RealSchur.h +558 -0
  220. tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h +77 -0
  221. tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +899 -0
  222. tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h +87 -0
  223. tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/Tridiagonalization.h +561 -0
  224. tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/AlignedBox.h +486 -0
  225. tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/AngleAxis.h +247 -0
  226. tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/EulerAngles.h +114 -0
  227. tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/Homogeneous.h +501 -0
  228. tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/Hyperplane.h +282 -0
  229. tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/OrthoMethods.h +235 -0
  230. tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/ParametrizedLine.h +232 -0
  231. tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/Quaternion.h +870 -0
  232. tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/Rotation2D.h +199 -0
  233. tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/RotationBase.h +206 -0
  234. tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/Scaling.h +188 -0
  235. tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/Transform.h +1563 -0
  236. tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/Translation.h +202 -0
  237. tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/Umeyama.h +166 -0
  238. tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/arch/Geometry_SIMD.h +165 -0
  239. tinygwas-0.2.1/thirdparty/Eigen/src/Householder/BlockHouseholder.h +110 -0
  240. tinygwas-0.2.1/thirdparty/Eigen/src/Householder/Householder.h +176 -0
  241. tinygwas-0.2.1/thirdparty/Eigen/src/Householder/HouseholderSequence.h +545 -0
  242. tinygwas-0.2.1/thirdparty/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +226 -0
  243. tinygwas-0.2.1/thirdparty/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +212 -0
  244. tinygwas-0.2.1/thirdparty/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +229 -0
  245. tinygwas-0.2.1/thirdparty/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +394 -0
  246. tinygwas-0.2.1/thirdparty/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +453 -0
  247. tinygwas-0.2.1/thirdparty/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +444 -0
  248. tinygwas-0.2.1/thirdparty/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +198 -0
  249. tinygwas-0.2.1/thirdparty/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +117 -0
  250. tinygwas-0.2.1/thirdparty/Eigen/src/Jacobi/Jacobi.h +483 -0
  251. tinygwas-0.2.1/thirdparty/Eigen/src/KLUSupport/KLUSupport.h +358 -0
  252. tinygwas-0.2.1/thirdparty/Eigen/src/LU/Determinant.h +117 -0
  253. tinygwas-0.2.1/thirdparty/Eigen/src/LU/FullPivLU.h +877 -0
  254. tinygwas-0.2.1/thirdparty/Eigen/src/LU/InverseImpl.h +417 -0
  255. tinygwas-0.2.1/thirdparty/Eigen/src/LU/PartialPivLU.h +619 -0
  256. tinygwas-0.2.1/thirdparty/Eigen/src/LU/PartialPivLU_LAPACKE.h +83 -0
  257. tinygwas-0.2.1/thirdparty/Eigen/src/LU/arch/InverseSize4.h +348 -0
  258. tinygwas-0.2.1/thirdparty/Eigen/src/MetisSupport/MetisSupport.h +137 -0
  259. tinygwas-0.2.1/thirdparty/Eigen/src/OrderingMethods/Amd.h +435 -0
  260. tinygwas-0.2.1/thirdparty/Eigen/src/OrderingMethods/Eigen_Colamd.h +1863 -0
  261. tinygwas-0.2.1/thirdparty/Eigen/src/OrderingMethods/Ordering.h +153 -0
  262. tinygwas-0.2.1/thirdparty/Eigen/src/PaStiXSupport/PaStiXSupport.h +678 -0
  263. tinygwas-0.2.1/thirdparty/Eigen/src/PardisoSupport/PardisoSupport.h +545 -0
  264. tinygwas-0.2.1/thirdparty/Eigen/src/QR/ColPivHouseholderQR.h +674 -0
  265. tinygwas-0.2.1/thirdparty/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h +97 -0
  266. tinygwas-0.2.1/thirdparty/Eigen/src/QR/CompleteOrthogonalDecomposition.h +635 -0
  267. tinygwas-0.2.1/thirdparty/Eigen/src/QR/FullPivHouseholderQR.h +713 -0
  268. tinygwas-0.2.1/thirdparty/Eigen/src/QR/HouseholderQR.h +434 -0
  269. tinygwas-0.2.1/thirdparty/Eigen/src/QR/HouseholderQR_LAPACKE.h +68 -0
  270. tinygwas-0.2.1/thirdparty/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +335 -0
  271. tinygwas-0.2.1/thirdparty/Eigen/src/SVD/BDCSVD.h +1366 -0
  272. tinygwas-0.2.1/thirdparty/Eigen/src/SVD/JacobiSVD.h +812 -0
  273. tinygwas-0.2.1/thirdparty/Eigen/src/SVD/JacobiSVD_LAPACKE.h +91 -0
  274. tinygwas-0.2.1/thirdparty/Eigen/src/SVD/SVDBase.h +376 -0
  275. tinygwas-0.2.1/thirdparty/Eigen/src/SVD/UpperBidiagonalization.h +414 -0
  276. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCholesky/SimplicialCholesky.h +697 -0
  277. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +174 -0
  278. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/AmbiVector.h +378 -0
  279. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/CompressedStorage.h +274 -0
  280. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +352 -0
  281. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/MappedSparseMatrix.h +67 -0
  282. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseAssign.h +270 -0
  283. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseBlock.h +571 -0
  284. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseColEtree.h +206 -0
  285. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseCompressedBase.h +370 -0
  286. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +722 -0
  287. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +150 -0
  288. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseDenseProduct.h +342 -0
  289. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseDiagonalProduct.h +138 -0
  290. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseDot.h +98 -0
  291. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseFuzzy.h +29 -0
  292. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseMap.h +305 -0
  293. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseMatrix.h +1518 -0
  294. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseMatrixBase.h +398 -0
  295. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparsePermutation.h +178 -0
  296. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseProduct.h +181 -0
  297. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseRedux.h +49 -0
  298. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseRef.h +397 -0
  299. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseSelfAdjointView.h +659 -0
  300. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseSolverBase.h +124 -0
  301. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +198 -0
  302. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseTranspose.h +92 -0
  303. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseTriangularView.h +189 -0
  304. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseUtil.h +186 -0
  305. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseVector.h +478 -0
  306. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseView.h +254 -0
  307. tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/TriangularSolver.h +315 -0
  308. tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU.h +923 -0
  309. tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLUImpl.h +66 -0
  310. tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_Memory.h +226 -0
  311. tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_Structs.h +110 -0
  312. tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +375 -0
  313. tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_Utils.h +80 -0
  314. tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_column_bmod.h +181 -0
  315. tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_column_dfs.h +179 -0
  316. tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +107 -0
  317. tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +280 -0
  318. tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +126 -0
  319. tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +130 -0
  320. tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_panel_bmod.h +223 -0
  321. tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_panel_dfs.h +258 -0
  322. tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_pivotL.h +137 -0
  323. tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_pruneL.h +136 -0
  324. tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_relax_snode.h +83 -0
  325. tinygwas-0.2.1/thirdparty/Eigen/src/SparseQR/SparseQR.h +758 -0
  326. tinygwas-0.2.1/thirdparty/Eigen/src/StlSupport/StdDeque.h +116 -0
  327. tinygwas-0.2.1/thirdparty/Eigen/src/StlSupport/StdList.h +106 -0
  328. tinygwas-0.2.1/thirdparty/Eigen/src/StlSupport/StdVector.h +131 -0
  329. tinygwas-0.2.1/thirdparty/Eigen/src/StlSupport/details.h +84 -0
  330. tinygwas-0.2.1/thirdparty/Eigen/src/SuperLUSupport/SuperLUSupport.h +1025 -0
  331. tinygwas-0.2.1/thirdparty/Eigen/src/UmfPackSupport/UmfPackSupport.h +642 -0
  332. tinygwas-0.2.1/thirdparty/Eigen/src/misc/Image.h +82 -0
  333. tinygwas-0.2.1/thirdparty/Eigen/src/misc/Kernel.h +79 -0
  334. tinygwas-0.2.1/thirdparty/Eigen/src/misc/RealSvd2x2.h +55 -0
  335. tinygwas-0.2.1/thirdparty/Eigen/src/misc/blas.h +440 -0
  336. tinygwas-0.2.1/thirdparty/Eigen/src/misc/lapack.h +152 -0
  337. tinygwas-0.2.1/thirdparty/Eigen/src/misc/lapacke.h +16292 -0
  338. tinygwas-0.2.1/thirdparty/Eigen/src/misc/lapacke_mangling.h +17 -0
  339. tinygwas-0.2.1/thirdparty/Eigen/src/plugins/ArrayCwiseBinaryOps.h +358 -0
  340. tinygwas-0.2.1/thirdparty/Eigen/src/plugins/ArrayCwiseUnaryOps.h +657 -0
  341. tinygwas-0.2.1/thirdparty/Eigen/src/plugins/BlockMethods.h +1442 -0
  342. tinygwas-0.2.1/thirdparty/Eigen/src/plugins/CommonCwiseBinaryOps.h +115 -0
  343. tinygwas-0.2.1/thirdparty/Eigen/src/plugins/CommonCwiseUnaryOps.h +220 -0
  344. tinygwas-0.2.1/thirdparty/Eigen/src/plugins/IndexedViewMethods.h +262 -0
  345. tinygwas-0.2.1/thirdparty/Eigen/src/plugins/MatrixCwiseBinaryOps.h +152 -0
  346. tinygwas-0.2.1/thirdparty/Eigen/src/plugins/MatrixCwiseUnaryOps.h +95 -0
  347. tinygwas-0.2.1/thirdparty/Eigen/src/plugins/ReshapedMethods.h +149 -0
  348. tinygwas-0.2.1/thirdparty/pybind11/CMakeLists.txt +281 -0
  349. tinygwas-0.2.1/thirdparty/pybind11/LICENSE +29 -0
  350. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/attr.h +551 -0
  351. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/buffer_info.h +146 -0
  352. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/cast.h +2261 -0
  353. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/chrono.h +191 -0
  354. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/common.h +2 -0
  355. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/complex.h +65 -0
  356. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/detail/class.h +708 -0
  357. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/detail/common.h +861 -0
  358. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/detail/descr.h +100 -0
  359. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/detail/init.h +336 -0
  360. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/detail/internals.h +363 -0
  361. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/detail/typeid.h +55 -0
  362. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/eigen.h +607 -0
  363. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/embed.h +201 -0
  364. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/eval.h +152 -0
  365. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/functional.h +104 -0
  366. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/iostream.h +220 -0
  367. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/numpy.h +1693 -0
  368. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/operators.h +173 -0
  369. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/options.h +65 -0
  370. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/pybind11.h +2451 -0
  371. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/pytypes.h +1668 -0
  372. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/stl.h +388 -0
  373. tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/stl_bind.h +676 -0
  374. tinygwas-0.2.1/thirdparty/pybind11/tests/CMakeLists.txt +450 -0
  375. tinygwas-0.2.1/thirdparty/pybind11/tests/test_cmake_build/CMakeLists.txt +84 -0
  376. tinygwas-0.2.1/thirdparty/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt +26 -0
  377. tinygwas-0.2.1/thirdparty/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt +38 -0
  378. tinygwas-0.2.1/thirdparty/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt +45 -0
  379. tinygwas-0.2.1/thirdparty/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt +39 -0
  380. tinygwas-0.2.1/thirdparty/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt +34 -0
  381. tinygwas-0.2.1/thirdparty/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt +40 -0
  382. tinygwas-0.2.1/thirdparty/pybind11/tests/test_embed/CMakeLists.txt +46 -0
  383. tinygwas-0.2.1/thirdparty/pybind11/tools/FindCatch.cmake +70 -0
  384. tinygwas-0.2.1/thirdparty/pybind11/tools/FindEigen3.cmake +86 -0
  385. tinygwas-0.2.1/thirdparty/pybind11/tools/FindPythonLibsNew.cmake +257 -0
  386. tinygwas-0.2.1/thirdparty/pybind11/tools/check-style.sh +44 -0
  387. tinygwas-0.2.1/thirdparty/pybind11/tools/cmake_uninstall.cmake.in +23 -0
  388. tinygwas-0.2.1/thirdparty/pybind11/tools/libsize.py +38 -0
  389. tinygwas-0.2.1/thirdparty/pybind11/tools/make_changelog.py +63 -0
  390. tinygwas-0.2.1/thirdparty/pybind11/tools/pybind11Common.cmake +393 -0
  391. tinygwas-0.2.1/thirdparty/pybind11/tools/pybind11Config.cmake.in +232 -0
  392. tinygwas-0.2.1/thirdparty/pybind11/tools/pybind11NewTools.cmake +267 -0
  393. tinygwas-0.2.1/thirdparty/pybind11/tools/pybind11Tools.cmake +220 -0
  394. tinygwas-0.2.1/thirdparty/pybind11/tools/pyproject.toml +3 -0
  395. tinygwas-0.2.1/thirdparty/pybind11/tools/setup_global.py.in +63 -0
  396. tinygwas-0.2.1/thirdparty/pybind11/tools/setup_main.py.in +36 -0
  397. {tinygwas-0.2 → tinygwas-0.2.1}/tinygwas.egg-info/PKG-INFO +1 -1
  398. tinygwas-0.2.1/tinygwas.egg-info/SOURCES.txt +401 -0
  399. tinygwas-0.2/tinygwas.egg-info/SOURCES.txt +0 -8
  400. {tinygwas-0.2 → tinygwas-0.2.1}/setup.cfg +0 -0
  401. {tinygwas-0.2 → tinygwas-0.2.1}/tinygwas.egg-info/dependency_links.txt +0 -0
  402. {tinygwas-0.2 → tinygwas-0.2.1}/tinygwas.egg-info/not-zip-safe +0 -0
  403. {tinygwas-0.2 → tinygwas-0.2.1}/tinygwas.egg-info/requires.txt +0 -0
  404. {tinygwas-0.2 → tinygwas-0.2.1}/tinygwas.egg-info/top_level.txt +0 -0
@@ -0,0 +1,14 @@
1
+ cmake_minimum_required(VERSION 3.12)
2
+ project(tinygwas)
3
+
4
+ set(CMAKE_BUILD_TYPE Release)
5
+ set(CMAKE_CXX_STANDARD 14)
6
+
7
+ include_directories(${CMAKE_SOURCE_DIR}/thirdparty/)
8
+ set(SOURCE_FILES src/FileUtils.cpp src/FileUtils.h src/Utils.cpp src/Utils.h)
9
+
10
+ add_subdirectory(thirdparty/pybind11)
11
+ pybind11_add_module(tinygwas src/main.cpp ${SOURCE_FILES})
12
+
13
+ #add_executable(tinygwas src/main.cpp ${SOURCE_FILES} )
14
+ #install(TARGETS tinygwas)
@@ -0,0 +1,6 @@
1
+ include README.md thirdparty/pybind11/LICENSE
2
+ graft thirdparty/Eigen
3
+ graft thirdparty/pybind11/include
4
+ graft thirdparty/pybind11/tools
5
+ graft src
6
+ global-include CMakeLists.txt *.cmake
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinygwas
3
- Version: 0.2
3
+ Version: 0.2.1
4
4
  Summary: Toy C++ implementation with python wrapper for genome-wide association testing
5
5
  Author: Kangcheng Hou
6
6
  Author-email: kangchenghou@gmail.com
@@ -3,8 +3,12 @@
3
3
 
4
4
  ## Install python version
5
5
  ```bash
6
+ # from latest published version
7
+ pip install tinygwas
8
+ # from github
6
9
  pip install -e .
7
10
  ```
8
11
 
12
+
9
13
  ## Contact
10
14
  Kangcheng Hou (kangchenghou@gmail.com)
@@ -73,7 +73,7 @@ class CMakeBuild(build_ext):
73
73
 
74
74
  setup(
75
75
  name="tinygwas",
76
- version="0.2",
76
+ version="0.2.1",
77
77
  install_requires=["pybind11", "numpy"],
78
78
  author="Kangcheng Hou",
79
79
  author_email="kangchenghou@gmail.com",
@@ -0,0 +1,45 @@
1
+ #include "FileUtils.h"
2
+
3
+ bool is_file_exist(const string & fileName)
4
+ {
5
+ std::ifstream infile(fileName);
6
+ return infile.good();
7
+ }
8
+
9
+ MatrixXi read_int_mat(const std::string &path) {
10
+ std::ifstream in_data;
11
+ in_data.open(path);
12
+ std::string line;
13
+ std::vector<int> values;
14
+ uint n_row = 0;
15
+
16
+ while (std::getline(in_data, line)) {
17
+ for (int i = 0; i < line.size(); i++) {
18
+ values.push_back(line[i] - '0');
19
+ }
20
+ n_row++;
21
+ }
22
+ return Eigen::Map<Matrix<int, Dynamic, Dynamic, RowMajor>>(values.data(), n_row, values.size() / n_row);
23
+ }
24
+
25
+ void write_int_mat(const std::string &path, const MatrixXi& mat) {
26
+ ofstream output(path);
27
+ for (int i = 0; i < mat.rows(); i++){
28
+ for (int j = 0; j < mat.cols(); j++){
29
+ output << mat(i, j);
30
+ }
31
+ output << "\n";
32
+ }
33
+ }
34
+
35
+ VectorXi read_pos(const std::string &path) {
36
+ std::ifstream in_data;
37
+ in_data.open(path);
38
+ std::string line;
39
+ std::vector<int> values;
40
+
41
+ while (std::getline(in_data, line)) {
42
+ values.push_back(std::stoi(line));
43
+ }
44
+ return Map<VectorXi>(values.data(), values.size());
45
+ }
@@ -0,0 +1,17 @@
1
+ #ifndef FILEUTILS_H
2
+ #define FILEUTILS_H
3
+ #include <iostream>
4
+ #include <fstream>
5
+ #include <vector>
6
+ #include <limits>
7
+ #include <Eigen/Core>
8
+
9
+ using namespace std;
10
+ using namespace Eigen;
11
+
12
+ MatrixXi read_int_mat(const std::string &path);
13
+ VectorXi read_pos(const std::string &path);
14
+ void write_int_mat(const std::string &path, const MatrixXi& mat);
15
+ bool is_file_exist(const string & fileName);
16
+
17
+ #endif
@@ -0,0 +1 @@
1
+ #include "Utils.h"
@@ -0,0 +1,15 @@
1
+ #ifndef UTILS_H
2
+ #define UTILS_H
3
+
4
+ #include <Eigen/Core>
5
+ #include <cmath>
6
+ #include <iostream>
7
+
8
+ #define PBSTR "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
9
+ #define PBWIDTH 60
10
+
11
+ void print_progress(double percentage);
12
+
13
+ using namespace std;
14
+ using namespace Eigen;
15
+ #endif
@@ -0,0 +1,283 @@
1
+ #include <Eigen/Core>
2
+ #include <Eigen/LU>
3
+ #include <Eigen/SVD>
4
+ #include <ctime>
5
+ #include <iostream>
6
+ #include <numeric>
7
+ #include <random>
8
+ #include <vector>
9
+
10
+ #include <pybind11/eigen.h>
11
+ #include <pybind11/numpy.h>
12
+ #include <pybind11/pybind11.h>
13
+ #include <pybind11/stl.h>
14
+
15
+ namespace py = pybind11;
16
+
17
+ using namespace std;
18
+ using namespace Eigen;
19
+ using RowMatrixXd =
20
+ Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
21
+
22
+ /*
23
+ * Logistic regression IRLS implementation.
24
+ * Based on https://bwlewis.github.io/GLM/#svdnewton
25
+ * Perform likelihood ratio test for hypothesis testing
26
+ */
27
+
28
+ /*
29
+ * The following functions follow the interface for GLM, currently only logistic
30
+ * regression is implemented. However, it is straightforward to extend to other
31
+ * GLM family.
32
+ */
33
+
34
+ double link(double mu) { return log(mu / (1 - mu)); }
35
+
36
+ double linkinv(double eta) { return 1 / (1 + exp(-eta)); }
37
+
38
+ double variance(double g) { return g * (1 - g); }
39
+
40
+ double mu_eta(double eta) {
41
+ // derivative of mu to eta
42
+ return exp(-eta) / pow((1 + exp(-eta)), 2);
43
+ }
44
+
45
+ double logistic_reg(const MatrixXd &X, const VectorXd &y,
46
+ Eigen::Ref<VectorXd> b, Eigen::Ref<VectorXd> se,
47
+ int max_iter, double tol) {
48
+ // b is the effect sizes to be optimized in place, also used as the starting
49
+ // points return loglikelihood
50
+
51
+ int n = X.rows();
52
+ int m = X.cols();
53
+ JacobiSVD<MatrixXd> svd(X, ComputeThinU | ComputeThinV);
54
+
55
+ VectorXd eta = X * b;
56
+ VectorXd s = VectorXd::Zero(m);
57
+ VectorXd s_old(m);
58
+
59
+ VectorXd g(n);
60
+ VectorXd gprime(n);
61
+ VectorXd var_g(n);
62
+ VectorXd z(n);
63
+ VectorXd W(n);
64
+
65
+ for (int i_iter = 0; i_iter < max_iter; i_iter++) {
66
+ g = eta.unaryExpr(std::ref(linkinv));
67
+ var_g = g.unaryExpr(std::ref(variance));
68
+ gprime = eta.unaryExpr(std::ref(mu_eta));
69
+ z = eta + (y - g).cwiseQuotient(gprime);
70
+ W = gprime.array().square() / var_g.array();
71
+
72
+ // fraction of observations can be perfectly predicted
73
+ double predclose_frac =
74
+ ((y - g).cwiseAbs().array() < 1e-4).cast<double>().mean();
75
+ if (predclose_frac > 0.05) {
76
+ cout << "Warning: [tinygwas.logistic_reg] A fraction of "
77
+ << static_cast<int>(predclose_frac * 100)
78
+ << "% of the observations can be perfectly predicted (abs(y - g) < "
79
+ "1e-4). This might indicate complete quasi-separation. Exiting "
80
+ "iterations early and the corresponding loglik is set to NaN"
81
+ << endl;
82
+ return std::numeric_limits<double>::quiet_NaN();
83
+ }
84
+
85
+ s_old = s;
86
+
87
+ // solve U.T W U s = U.T W z
88
+ auto UtW = svd.matrixU().transpose() * W.asDiagonal();
89
+ s = (UtW * svd.matrixU()).ldlt().solve(UtW * z);
90
+ eta = svd.matrixU() * s;
91
+ if ((s - s_old).squaredNorm() < tol) {
92
+ break;
93
+ }
94
+ }
95
+
96
+ b = svd.matrixV() * svd.singularValues().cwiseInverse().asDiagonal() *
97
+ svd.matrixU().transpose() * eta;
98
+ VectorXd mu = eta.unaryExpr(std::ref(linkinv));
99
+
100
+ // calculate standard errors of beta
101
+ VectorXd var_mu = mu.unaryExpr(std::ref(variance));
102
+ se = (X.transpose() * var_mu.asDiagonal() * X)
103
+ .inverse()
104
+ .diagonal()
105
+ .cwiseSqrt();
106
+
107
+ double loglik = 0.;
108
+ for (int i = 0; i < n; i++) {
109
+ loglik += y(i) * log(mu(i) + 1e-20) + (1 - y(i)) * log(1 - mu(i) + 1e-20);
110
+ }
111
+ return loglik;
112
+ }
113
+
114
+ /*
115
+ * Implement repeated logistic regression
116
+ */
117
+ void logistic_lrt(const MatrixXd &var, const MatrixXd &cov, const VectorXd &y,
118
+ int test_size, const vector<int> &test_index,
119
+ Eigen::Ref<RowMatrixXd> res, int max_iter = 200,
120
+ double tol = 1e-6) {
121
+ // return BETA1, SE1, BETA2, SE2, N, P
122
+ int n_indiv = var.rows();
123
+ int n_var = var.cols();
124
+ int n_cov = cov.cols();
125
+
126
+ int n_test = n_var / test_size;
127
+
128
+ if (!((res.rows() == n_test) && (res.cols() == test_size * 2 + 2))) {
129
+ throw std::invalid_argument("[tinygwas.logistic_lrt] res should be a "
130
+ "matrix of size (n_test, test_size * 2 + 2)");
131
+ }
132
+
133
+ MatrixXd design(n_indiv, n_cov + test_size);
134
+ design << MatrixXd::Zero(n_indiv, test_size), cov;
135
+
136
+ // coefficients for the covariates
137
+ VectorXd beta_cov = VectorXd::Zero(n_cov);
138
+ VectorXd se_cov = VectorXd::Zero(n_cov);
139
+ logistic_reg(design(all, seq(test_size, n_cov + test_size - 1)), y, beta_cov,
140
+ se_cov, max_iter, tol);
141
+
142
+ VectorXd beta_full = VectorXd::Zero(n_cov + test_size);
143
+ VectorXd se_full = VectorXd::Zero(n_cov + test_size);
144
+ VectorXd beta_reduced = VectorXd::Zero(n_cov + test_size - test_index.size());
145
+ VectorXd se_reduced = VectorXd::Zero(n_cov + test_size - test_index.size());
146
+
147
+ // find index that is in the reduced model
148
+ vector<int> reduced_index;
149
+ for (int i = 0; i < test_size; i++) {
150
+ if (find(test_index.begin(), test_index.end(), i) == test_index.end()) {
151
+ reduced_index.push_back(i);
152
+ }
153
+ }
154
+ for (int i = test_size; i < n_cov + test_size; i++) {
155
+ reduced_index.push_back(i);
156
+ }
157
+ VectorXd loglik_diff(n_test);
158
+
159
+ for (int i_test = 0; i_test < n_test; i_test++) {
160
+ design(all, seq(0, test_size - 1)) =
161
+ var(all, seq(i_test * test_size, i_test * test_size + test_size - 1));
162
+
163
+ // get the individual where all the variables are not NaN
164
+ vector<int> test_indiv_idx;
165
+ for (int i = 0; i < n_indiv; i++) {
166
+ if (!design(i, seq(0, test_size - 1)).array().isNaN().any()) {
167
+ test_indiv_idx.push_back(i);
168
+ }
169
+ }
170
+ int n_test_indiv = test_indiv_idx.size();
171
+
172
+ beta_full.setZero();
173
+ beta_reduced.setZero();
174
+ beta_full(seq(test_size, n_cov + test_size - 1)) = beta_cov;
175
+
176
+ double loglik_full =
177
+ logistic_reg(design(test_indiv_idx, all), y(test_indiv_idx), beta_full,
178
+ se_full, max_iter, tol);
179
+ beta_reduced = beta_full(reduced_index);
180
+ double loglik_reduced =
181
+ logistic_reg(design(test_indiv_idx, reduced_index), y(test_indiv_idx),
182
+ beta_reduced, se_reduced, max_iter, tol);
183
+
184
+ // save results: BETA1, SE1, BETA2, SE2, ..., N, loglihood_diff
185
+ for (int i = 0; i < test_size; i++) {
186
+ res(i_test, i * 2) = beta_full(i);
187
+ res(i_test, i * 2 + 1) = se_full(i);
188
+ }
189
+ res(i_test, test_size * 2) = n_test_indiv;
190
+ res(i_test, test_size * 2 + 1) = loglik_full - loglik_reduced;
191
+ }
192
+ return;
193
+ }
194
+
195
+ /*
196
+ * For potential computational speedup in the linear regression mode.
197
+ b = np.dot(cov2.T, cov2)
198
+ b_inv = linalg.inv(b)
199
+
200
+ # define commonly used term in subsequent computations
201
+
202
+ # covariance terms
203
+ a = np.dot(cov1.T, cov1)
204
+ a_inv = linalg.inv(a)
205
+
206
+ v = np.dot(cov1.T, cov2)
207
+ v_mul_b_inv = np.dot(v, b_inv)
208
+ # quadratic form
209
+ b_quad = np.linalg.multi_dot([v, b_inv, v.T])
210
+ d_inv = linalg.inv(np.eye(2) - np.dot(b_quad, a_inv))
211
+
212
+ inv11 = a_inv + np.linalg.multi_dot([a_inv, b_quad, d_inv, a_inv])
213
+ inv12 = -np.dot(linalg.inv(a - quad_form), v_mul_b_inv)
214
+ inv22 = b_inv - np.linalg.multi_dot([v_mul_b_inv.T, a_inv, d_inv, v_mul_b_inv])
215
+ */
216
+
217
+ void linear_f_test(const MatrixXd &var, const MatrixXd &cov, const VectorXd &y,
218
+ int test_size, const vector<int> &test_index,
219
+ Eigen::Ref<RowMatrixXd> res) {
220
+ // F-test for linear regression
221
+ // var: variables to be tested (NaN is allowed)
222
+ // cov: covariates common to all tests (no NaN is assumed)
223
+ // y: response variables
224
+ // test_size: number of variables included in each test.
225
+ // test_index: index of the variables to be tested.
226
+ // return: BETA1, SE1, BETA2, SE2, N, f-stat
227
+
228
+ int n_indiv = var.rows();
229
+ int n_var = var.cols();
230
+ int n_cov = cov.cols();
231
+
232
+ MatrixXd design(n_indiv, n_cov + test_size);
233
+ design << MatrixXd::Zero(n_indiv, test_size), cov;
234
+ int n_test = n_var / test_size;
235
+ if (!((res.rows() == n_test) && (res.cols() == test_size * 2 + 2))) {
236
+ throw std::invalid_argument("[tinygwas.logistic_lrt] res should be a "
237
+ "matrix of size (n_test, test_size * 2 + 2)");
238
+ }
239
+
240
+ for (int i_test = 0; i_test < n_test; i_test++) {
241
+ design(all, seq(0, test_size - 1)) =
242
+ var(all, seq(i_test * test_size, i_test * test_size + test_size - 1));
243
+
244
+ // get the individual where all the variables are not NaN
245
+ vector<int> test_indiv_idx;
246
+ for (int i = 0; i < n_indiv; i++) {
247
+ if (!design(i, seq(0, test_size - 1)).array().isNaN().any()) {
248
+ test_indiv_idx.push_back(i);
249
+ }
250
+ }
251
+ int n_test_indiv = test_indiv_idx.size();
252
+
253
+ // compute only on the individuals that do not have NaN
254
+ JacobiSVD<MatrixXd> svd(design(test_indiv_idx, all),
255
+ ComputeThinU | ComputeThinV);
256
+ VectorXd beta = svd.solve(y(test_indiv_idx));
257
+ MatrixXd ViD = svd.matrixV() * svd.singularValues().asDiagonal().inverse();
258
+ double sigmasq =
259
+ (y(test_indiv_idx) - design(test_indiv_idx, all) * beta).squaredNorm() /
260
+ (n_test_indiv - n_cov - test_size);
261
+ MatrixXd iXtX = ViD * ViD.transpose();
262
+ MatrixXd f_stat = beta(test_index).transpose() *
263
+ iXtX(test_index, test_index).inverse() *
264
+ beta(test_index) / (test_index.size() * sigmasq);
265
+
266
+ // save results: BETA1, SE1, BETA2, SE2, ..., N, f-stat
267
+ for (int i = 0; i < test_size; i++) {
268
+ res(i_test, i * 2) = beta(i);
269
+ res(i_test, i * 2 + 1) = sqrt(sigmasq * iXtX(i, i));
270
+ }
271
+ res(i_test, test_size * 2) = n_test_indiv;
272
+ res(i_test, test_size * 2 + 1) = f_stat(0, 0);
273
+ }
274
+ return;
275
+ }
276
+
277
+ PYBIND11_MODULE(tinygwas, m) {
278
+ m.doc() = "Toy C++ implementation with python wrapper for genome-wide "
279
+ "association testing";
280
+ m.def("linear_f_test", &linear_f_test);
281
+ m.def("logistic_reg", &logistic_reg);
282
+ m.def("logistic_lrt", &logistic_lrt);
283
+ }
@@ -0,0 +1,45 @@
1
+ // This file is part of Eigen, a lightweight C++ template library
2
+ // for linear algebra.
3
+ //
4
+ // This Source Code Form is subject to the terms of the Mozilla
5
+ // Public License v. 2.0. If a copy of the MPL was not distributed
6
+ // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+
8
+ #ifndef EIGEN_CHOLESKY_MODULE_H
9
+ #define EIGEN_CHOLESKY_MODULE_H
10
+
11
+ #include "Core"
12
+ #include "Jacobi"
13
+
14
+ #include "src/Core/util/DisableStupidWarnings.h"
15
+
16
+ /** \defgroup Cholesky_Module Cholesky module
17
+ *
18
+ *
19
+ *
20
+ * This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices.
21
+ * Those decompositions are also accessible via the following methods:
22
+ * - MatrixBase::llt()
23
+ * - MatrixBase::ldlt()
24
+ * - SelfAdjointView::llt()
25
+ * - SelfAdjointView::ldlt()
26
+ *
27
+ * \code
28
+ * #include <Eigen/Cholesky>
29
+ * \endcode
30
+ */
31
+
32
+ #include "src/Cholesky/LLT.h"
33
+ #include "src/Cholesky/LDLT.h"
34
+ #ifdef EIGEN_USE_LAPACKE
35
+ #ifdef EIGEN_USE_MKL
36
+ #include "mkl_lapacke.h"
37
+ #else
38
+ #include "src/misc/lapacke.h"
39
+ #endif
40
+ #include "src/Cholesky/LLT_LAPACKE.h"
41
+ #endif
42
+
43
+ #include "src/Core/util/ReenableStupidWarnings.h"
44
+
45
+ #endif // EIGEN_CHOLESKY_MODULE_H
@@ -0,0 +1,48 @@
1
+ // This file is part of Eigen, a lightweight C++ template library
2
+ // for linear algebra.
3
+ //
4
+ // This Source Code Form is subject to the terms of the Mozilla
5
+ // Public License v. 2.0. If a copy of the MPL was not distributed
6
+ // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+
8
+ #ifndef EIGEN_CHOLMODSUPPORT_MODULE_H
9
+ #define EIGEN_CHOLMODSUPPORT_MODULE_H
10
+
11
+ #include "SparseCore"
12
+
13
+ #include "src/Core/util/DisableStupidWarnings.h"
14
+
15
+ extern "C" {
16
+ #include <cholmod.h>
17
+ }
18
+
19
+ /** \ingroup Support_modules
20
+ * \defgroup CholmodSupport_Module CholmodSupport module
21
+ *
22
+ * This module provides an interface to the Cholmod library which is part of the <a href="http://www.suitesparse.com">suitesparse</a> package.
23
+ * It provides the two following main factorization classes:
24
+ * - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization.
25
+ * - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial).
26
+ *
27
+ * For the sake of completeness, this module also propose the two following classes:
28
+ * - class CholmodSimplicialLLT
29
+ * - class CholmodSimplicialLDLT
30
+ * Note that these classes does not bring any particular advantage compared to the built-in
31
+ * SimplicialLLT and SimplicialLDLT factorization classes.
32
+ *
33
+ * \code
34
+ * #include <Eigen/CholmodSupport>
35
+ * \endcode
36
+ *
37
+ * In order to use this module, the cholmod headers must be accessible from the include paths, and your binary must be linked to the cholmod library and its dependencies.
38
+ * The dependencies depend on how cholmod has been compiled.
39
+ * For a cmake based project, you can use our FindCholmod.cmake module to help you in this task.
40
+ *
41
+ */
42
+
43
+ #include "src/CholmodSupport/CholmodSupport.h"
44
+
45
+ #include "src/Core/util/ReenableStupidWarnings.h"
46
+
47
+ #endif // EIGEN_CHOLMODSUPPORT_MODULE_H
48
+