You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

313 lines
12 KiB

  1. ;; Bioinformatics module
  2. (define-module (gn packages bioinformatics)
  3. #:use-module ((guix licenses) #:prefix license:)
  4. #:use-module (guix packages)
  5. #:use-module (guix utils)
  6. #:use-module (guix download)
  7. #:use-module (guix git-download)
  8. #:use-module (guix build-system gnu)
  9. #:use-module (guix build-system cmake)
  10. #:use-module (guix build-system perl)
  11. #:use-module (guix build-system python)
  12. #:use-module (guix build-system ruby)
  13. #:use-module (guix build-system r)
  14. #:use-module (guix build-system trivial)
  15. #:use-module (gnu packages)
  16. #:use-module (gnu packages algebra)
  17. #:use-module (gnu packages base)
  18. #:use-module (gnu packages bioinformatics)
  19. #:use-module (gnu packages boost)
  20. #:use-module (gnu packages compression)
  21. #:use-module (gnu packages databases)
  22. #:use-module (gnu packages cpio)
  23. #:use-module (gnu packages file)
  24. #:use-module (gnu packages graphviz)
  25. #:use-module (gnu packages java)
  26. #:use-module (gnu packages linux)
  27. #:use-module (gnu packages machine-learning)
  28. #:use-module (gnu packages maths)
  29. #:use-module (gnu packages ncurses)
  30. #:use-module (gnu packages perl)
  31. #:use-module (gnu packages pkg-config)
  32. #:use-module (gnu packages popt)
  33. #:use-module (gnu packages protobuf)
  34. #:use-module (gnu packages python)
  35. #:use-module (gnu packages ruby)
  36. #:use-module (gnu packages statistics)
  37. #:use-module (gnu packages tbb)
  38. #:use-module (gnu packages textutils)
  39. #:use-module (gnu packages vim)
  40. #:use-module (gnu packages web)
  41. #:use-module (gnu packages xml)
  42. #:use-module (gnu packages zip)
  43. #:use-module (gnu packages bootstrap)
  44. #:use-module (gn packages python)
  45. #:use-module (srfi srfi-1))
  46. (define-public my-deploy
  47. (package
  48. (name "my-deploy")
  49. (version "0.0.1")
  50. (source #f)
  51. (build-system trivial-build-system)
  52. (arguments
  53. `(#:guile ,%bootstrap-guile
  54. #:modules ((guix build utils))
  55. #:builder
  56. (let* ((out (assoc-ref %outputs "out"))
  57. (bash (assoc-ref %build-inputs "bash"))
  58. (foo (string-append out "/foo")))
  59. (begin
  60. (use-modules (guix build utils))
  61. (mkdir out)
  62. (call-with-output-file foo
  63. (lambda (p)
  64. (format p
  65. "#!~a~%echo \"${GUIX_FOO} ${GUIX_BAR}\"~%"
  66. bash)))
  67. (chmod foo #o777)
  68. ;; wrap-program uses `which' to find bash for the wrapper
  69. ;; shebang, but it can't know about the bootstrap bash in
  70. ;; the store, since it's not named "bash". Help it out a
  71. ;; bit by providing a symlink it this package's output.
  72. (symlink bash (string-append out "/bash"))
  73. (setenv "PATH" out)
  74. (wrap-program foo `("GUIX_FOO" prefix ("hello")))
  75. (wrap-program foo `("GUIX_BAR" prefix ("world")))
  76. #t))))
  77. (inputs `(("bash" ,(search-bootstrap-binary "bash"
  78. (%current-system)))))
  79. (home-page #f)
  80. (synopsis #f)
  81. (description #f)
  82. (license #f)))
  83. (define-public r-wgcna
  84. (package
  85. (name "r-wgcna")
  86. (version "1.48")
  87. (source
  88. (origin
  89. (method url-fetch)
  90. (uri (cran-uri "WGCNA" version))
  91. (sha256
  92. (base32
  93. "18yl2v3s279saq318vd5hlwnqfm89rxmjjji778d2d26vviaf6bn"))))
  94. (properties `((upstream-name . "WGCNA")))
  95. (build-system r-build-system)
  96. ;; (propagated-inputs
  97. ;; `( ;; ("r-annotationdbi" ,r-annotationdbi)
  98. ;; ("r-doparallel" ,r-doparallel)
  99. ;; ("r-dynamictreecut" ,r-dynamictreecut)
  100. ;; ("r-fastcluster" ,r-fastcluster)
  101. ;; ("r-foreach" ,r-foreach)
  102. ;; ("r-go.db" ,r-go.db)
  103. ;; ("r-grdevices" ,r-grdevices)
  104. ;; ("r-hmisc" ,r-hmisc)
  105. ;; ("r-impute" ,r-impute)
  106. ;; ("r-matrixstats" ,r-matrixstats)
  107. ;; ("r-parallel" ,r-parallel)
  108. ;; ("r-preprocesscore" ,r-preprocesscore)
  109. ;; ("r-splines" ,r-splines)
  110. ;; ("r-stats" ,r-stats)
  111. ;; ("r-survival" ,r-survival)
  112. ;; ("r-utils" ,r-utils)))
  113. (home-page
  114. "http://www.genetics.ucla.edu/labs/horvath/CoexpressionNetwork/Rpackages/WGCNA/")
  115. (synopsis
  116. "Weighted Correlation Network Analysis")
  117. (description
  118. "Functions necessary to perform Weighted Correlation Network Analysis on high-dimensional data. Includes functions for rudimentary data cleaning, construction of correlation networks, module identification, summarization, and relating of variables and modules to sample traits. Also includes a number of utility functions for data manipulation and visualization.")
  119. (license license:gpl2+)))
  120. (define-public qtlreaper
  121. (package
  122. (name "qtlreaper")
  123. (version "1.1.1")
  124. (source
  125. (origin
  126. (method url-fetch)
  127. (uri (string-append
  128. "mirror://sourceforge/qtlreaper/qtlreaper-" version ".tar.gz"
  129. ;; "http://downloads.sourceforge.net/project/qtlreaper/qtlreaper/1.1.1/qtlreaper-1.1.1.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fqtlreaper%2Ffiles%2Flatest%2Fdownload&ts=1358975786&use_mirror=iweb"))
  130. ))
  131. (file-name (string-append name "-" version ".tar.gz"))
  132. (sha256
  133. (base32
  134. "0rbf030940nbbbkggdq2dxiy3c0jv8l4y3vvyfxhqimgj0qv3l1x"))))
  135. (build-system python-build-system)
  136. ;; (native-inputs
  137. ;; `(("python-setuptools" ,python-setuptools)))
  138. (arguments
  139. `(#:python ,python-2
  140. #:tests? #f)) ; no 'setup.py test'
  141. (home-page "http://qtlreaper.sourceforge.net/")
  142. (synopsis "Tool for scanning expression data for QTLs")
  143. (description
  144. "It is essentially the batch-oriented version of WebQTL. It
  145. requires, as input, expression data from members of a set of
  146. recombinant inbred lines and genotype information for the same
  147. lines. It searches for an association between each expression trait
  148. and all genotypes and evaluates that association by a permutation
  149. test. For the permutation test, it performs only as many permutations
  150. as are necessary to define the empirical P-value to a reasonable
  151. precision. It also performs bootstrap resampling to estimate the
  152. confidence region for the location of a putative QTL.")
  153. (license license:gpl2)))
  154. (define-public gemma
  155. (let ((commit "2de4bfab3"))
  156. (package
  157. (name "gemma")
  158. (version (string-append "0.9.5-" commit ))
  159. (source (origin
  160. (method git-fetch)
  161. (uri (git-reference
  162. (url "https://github.com/genenetwork/GEMMA.git")
  163. (commit commit)))
  164. (file-name (string-append name "-" commit))
  165. (sha256
  166. (base32
  167. "1drffdgwbzgiw9sf55ghl3zjv58f8i9kfz0zys5mp6n06syp4ira"))))
  168. (inputs `(
  169. ("gsl" ,gsl)
  170. ("lapack" ,lapack)
  171. ("zlib" ,zlib)
  172. ))
  173. (build-system gnu-build-system)
  174. (arguments
  175. `(#:make-flags '(" FORCE_DYNAMIC=1")
  176. #:phases
  177. (modify-phases %standard-phases
  178. (delete 'configure)
  179. (add-before 'build 'bin-mkdir
  180. (lambda _
  181. (mkdir-p "bin")
  182. ))
  183. (replace 'install
  184. (lambda* (#:key outputs #:allow-other-keys)
  185. (let ((out (assoc-ref outputs "out")))
  186. (install-file "bin/gemma" (string-append out "/bin"))))))
  187. #:tests? #f))
  188. (home-page "")
  189. (synopsis "Tool for genome-wide efficient mixed model association")
  190. (description "GEMMA is the software implementing the Genome-wide
  191. Efficient Mixed Model Association algorithm for a standard linear
  192. mixed model and some of its close relatives for genome-wide
  193. association studies (GWAS).")
  194. (license license:gpl3))))
  195. (define-public genenetwork1
  196. (let ((commit "d622c803b"))
  197. (package
  198. (name "genenetwork1")
  199. (version (string-append "1.0-" commit ))
  200. (source (origin
  201. (method git-fetch)
  202. (uri (git-reference
  203. (url "https://github.com/genenetwork/genenetwork.git")
  204. ;; (url "https://github.com/pjotrp/genenetwork.git")
  205. (commit commit)))
  206. (file-name (string-append name "-" commit))
  207. (sha256
  208. (base32
  209. "14fzfcm4vl20mlhxjslfa01i1nmxpk8lbxmfvpq6dyfc22ir62py"))))
  210. (propagated-inputs `(
  211. ("python" ,python-2) ;; probably superfluous
  212. ("r" ,r)
  213. ))
  214. (inputs `(
  215. ;; http://spring211.uthsc.edu/gn/thirdparty.tbz
  216. ;; graphviz-2.22.2 htmlgen json numarray-1.5.2 piddle PIL pp-1.5.7 pyx pyXLWriter svg
  217. ("mysql" ,mysql)
  218. ("nginx" ,nginx)
  219. ("graphviz" ,graphviz)
  220. ; ("python2-jinja2" ,python2-jinja2)
  221. ; ("python2-sqlalchemy" ,python2-sqlalchemy)
  222. ; ("python2-setuptools" ,python2-setuptools)
  223. ; ("python2-scipy" ,python2-scipy)
  224. ;; looks like python-numarray is not needed
  225. ; ("python2-numpy" ,python2-numpy)
  226. ; ("python2-pandas" ,python2-pandas)
  227. ; ("python2-passlib" ,python2-passlib)
  228. ; ("python2-redis" ,python2-redis)
  229. ; ("python2-requests" ,python2-requests)
  230. ; ("python2-simplejson" ,python2-simplejson)
  231. ; ("python2-pyyaml" ,python2-pyyaml)
  232. ;; python-yolk is not needed
  233. ("python2-pil" ,python2-pil)
  234. ("python2-numarray" ,python2-numarray)
  235. ("plink" ,plink) ;; gn1
  236. ; ("r-qtl" ,r-qtl)
  237. ))
  238. (build-system python-build-system)
  239. (arguments
  240. `(#:python ,python-2
  241. #:tests? #f)) ; no 'setup.py test'
  242. (home-page "http://genenetwork.org/")
  243. (synopsis "Full genenetwork services")
  244. (description "Genenetwork installation sumo.")
  245. (license license:agpl3+))))
  246. (define-public genenetwork2
  247. (let ((commit "9e9475053"))
  248. (package
  249. (name "genenetwork2")
  250. (version (string-append "2.0-" commit ))
  251. (source (origin
  252. (method git-fetch)
  253. (uri (git-reference
  254. ;; (url "https://github.com/genenetwork/genenetwork2.git")
  255. (url "https://github.com/pjotrp/genenetwork2.git")
  256. (commit commit)))
  257. (file-name (string-append name "-" commit))
  258. (sha256
  259. (base32
  260. "09hvy9mf4dnmkb8qg49viffzrxk53m2kr4r955m84dxaa5pdrjhd"))))
  261. (propagated-inputs `(
  262. ("python" ,python-2) ;; probably superfluous
  263. ("r" ,r)
  264. ))
  265. (inputs `(
  266. ("mysql" ,mysql)
  267. ("gemma" ,gemma)
  268. ("nginx" ,nginx)
  269. ("python2-flask" ,python2-flask)
  270. ("python2-htmlgen-gn" ,python2-htmlgen-gn)
  271. ("python2-jinja2" ,python2-jinja2)
  272. ("python2-sqlalchemy" ,python2-sqlalchemy)
  273. ("python2-flask-sqlalchemy" ,python2-flask-sqlalchemy)
  274. ("python2-setuptools" ,python2-setuptools)
  275. ("python2-scipy" ,python2-scipy)
  276. ;; looks like python-numarray is not needed
  277. ("python2-mysqlclient" ,python2-mysqlclient)
  278. ("python2-numarray" ,python2-numarray)
  279. ("python2-numpy" ,python2-numpy)
  280. ("python2-pandas" ,python2-pandas)
  281. ("python2-parallel" ,python2-parallel)
  282. ("python2-passlib" ,python2-passlib)
  283. ("python2-piddle" ,python2-piddle)
  284. ("python2-redis" ,python2-redis)
  285. ("python2-requests" ,python2-requests)
  286. ("python2-rpy2" ,python2-rpy2)
  287. ("python2-scipy" ,python2-scipy)
  288. ("python2-simplejson" ,python2-simplejson)
  289. ("python2-pyyaml" ,python2-pyyaml)
  290. ("python-xlsxwriter" ,python-xlsxwriter)
  291. ;; python-yolk is not needed
  292. ("plink" ,plink)
  293. ("qtlreaper" ,qtlreaper)
  294. ("r-qtl" ,r-qtl)
  295. ))
  296. (build-system python-build-system)
  297. (arguments
  298. `(#:python ,python-2
  299. #:tests? #f)) ; no 'setup.py test'
  300. (home-page "http://genenetwork.org/")
  301. (synopsis "Full genenetwork services")
  302. (description "Genenetwork installation sumo.")
  303. (license license:agpl3+))))