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.

369 lines
14 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 plink2
  155. (package
  156. (name "plink2")
  157. (version "1.90b3")
  158. (source
  159. (origin
  160. (method url-fetch)
  161. ;; https://github.com/chrchang/plink-ng/archive/v1.90b3.tar.gz
  162. (uri (string-append
  163. "https://github.com/chrchang/plink-ng/archive/v"
  164. version ".tar.gz"))
  165. (sha256
  166. (base32 "03fzib1al5qkr9vxv63wxmv6y2pfb1rmir0h8jpi72r87hczqjig"))
  167. (patches (list (search-patch "plink-ng-Makefile-zlib.patch")))))
  168. (build-system gnu-build-system)
  169. (arguments
  170. '(#:tests? #t ;no "check" target
  171. #:make-flags (list (string-append "LIB_LAPACK="
  172. (assoc-ref %build-inputs "lapack")
  173. "/lib/liblapack.so")
  174. "WITH_LAPACK=1"
  175. "FORCE_DYNAMIC=1"
  176. ;; disable phoning home
  177. "WITH_WEBCHECK=")
  178. #:phases
  179. (modify-phases %standard-phases
  180. (delete 'configure)
  181. (replace 'build
  182. (lambda _
  183. (system* "make" "-f" "Makefile.std")
  184. ))
  185. (replace 'install
  186. (lambda* (#:key outputs #:allow-other-keys)
  187. (let ((bin (string-append (assoc-ref outputs "out")
  188. "/bin/")))
  189. (install-file "plink" bin)
  190. #t))))))
  191. (inputs
  192. `(("zlib" ,zlib)
  193. ("lapack" ,lapack)))
  194. (native-inputs
  195. `(("unzip" ,unzip)))
  196. (home-page "https://www.cog-genomics.org/plink2")
  197. (synopsis "Whole genome association analysis toolset")
  198. (description
  199. "PLINK is a whole genome association analysis toolset, designed to
  200. perform a range of basic, large-scale analyses in a computationally efficient
  201. manner. The focus of PLINK is purely on analysis of genotype/phenotype data,
  202. so there is no support for steps prior to this (e.g. study design and
  203. planning, generating genotype or CNV calls from raw data). Through
  204. integration with gPLINK and Haploview, there is some support for the
  205. subsequent visualization, annotation and storage of results.")
  206. ;; Code is released under GPLv2, except for fisher.h, which is under
  207. ;; LGPLv2.1+
  208. (license (list license:gpl2 license:lgpl2.1+))))
  209. (define-public gemma
  210. (let ((commit "2de4bfab3"))
  211. (package
  212. (name "gemma")
  213. (version (string-append "0.9.5-" commit ))
  214. (source (origin
  215. (method git-fetch)
  216. (uri (git-reference
  217. (url "https://github.com/genenetwork/GEMMA.git")
  218. (commit commit)))
  219. (file-name (string-append name "-" commit))
  220. (sha256
  221. (base32
  222. "1drffdgwbzgiw9sf55ghl3zjv58f8i9kfz0zys5mp6n06syp4ira"))))
  223. (inputs `(
  224. ("gsl" ,gsl)
  225. ("lapack" ,lapack)
  226. ("zlib" ,zlib)
  227. ))
  228. (build-system gnu-build-system)
  229. (arguments
  230. `(#:make-flags '(" FORCE_DYNAMIC=1")
  231. #:phases
  232. (modify-phases %standard-phases
  233. (delete 'configure)
  234. (add-before 'build 'bin-mkdir
  235. (lambda _
  236. (mkdir-p "bin")
  237. ))
  238. (replace 'install
  239. (lambda* (#:key outputs #:allow-other-keys)
  240. (let ((out (assoc-ref outputs "out")))
  241. (install-file "bin/gemma" (string-append out "/bin"))))))
  242. #:tests? #f))
  243. (home-page "")
  244. (synopsis "Tool for genome-wide efficient mixed model association")
  245. (description "GEMMA is the software implementing the Genome-wide
  246. Efficient Mixed Model Association algorithm for a standard linear
  247. mixed model and some of its close relatives for genome-wide
  248. association studies (GWAS).")
  249. (license license:gpl3))))
  250. (define-public genenetwork1
  251. (let ((commit "d622c803b"))
  252. (package
  253. (name "genenetwork1")
  254. (version (string-append "1.0-" commit ))
  255. (source (origin
  256. (method git-fetch)
  257. (uri (git-reference
  258. (url "https://github.com/genenetwork/genenetwork.git")
  259. ;; (url "https://github.com/pjotrp/genenetwork.git")
  260. (commit commit)))
  261. (file-name (string-append name "-" commit))
  262. (sha256
  263. (base32
  264. "14fzfcm4vl20mlhxjslfa01i1nmxpk8lbxmfvpq6dyfc22ir62py"))))
  265. (propagated-inputs `(
  266. ("python" ,python-2) ;; probably superfluous
  267. ("r" ,r)
  268. ))
  269. (inputs `(
  270. ;; http://spring211.uthsc.edu/gn/thirdparty.tbz
  271. ;; graphviz-2.22.2 htmlgen json numarray-1.5.2 piddle PIL pp-1.5.7 pyx pyXLWriter svg
  272. ("mysql" ,mysql)
  273. ("nginx" ,nginx)
  274. ("graphviz" ,graphviz)
  275. ; ("python2-jinja2" ,python2-jinja2)
  276. ; ("python2-sqlalchemy" ,python2-sqlalchemy)
  277. ; ("python2-setuptools" ,python2-setuptools)
  278. ; ("python2-scipy" ,python2-scipy)
  279. ;; looks like python-numarray is not needed
  280. ; ("python2-numpy" ,python2-numpy)
  281. ; ("python2-pandas" ,python2-pandas)
  282. ; ("python2-passlib" ,python2-passlib)
  283. ; ("python2-redis" ,python2-redis)
  284. ; ("python2-requests" ,python2-requests)
  285. ; ("python2-simplejson" ,python2-simplejson)
  286. ; ("python2-pyyaml" ,python2-pyyaml)
  287. ;; python-yolk is not needed
  288. ("python2-pil" ,python2-pil)
  289. ("python2-numarray" ,python2-numarray)
  290. ("plink" ,plink) ;; gn1
  291. ; ("r-qtl" ,r-qtl)
  292. ))
  293. (build-system python-build-system)
  294. (arguments
  295. `(#:python ,python-2
  296. #:tests? #f)) ; no 'setup.py test'
  297. (home-page "http://genenetwork.org/")
  298. (synopsis "Full genenetwork services")
  299. (description "Genenetwork installation sumo.")
  300. (license license:agpl3+))))
  301. (define-public genenetwork2
  302. (let ((commit "9e9475053"))
  303. (package
  304. (name "genenetwork2")
  305. (version (string-append "2.0-" commit ))
  306. (source (origin
  307. (method git-fetch)
  308. (uri (git-reference
  309. ;; (url "https://github.com/genenetwork/genenetwork2.git")
  310. (url "https://github.com/pjotrp/genenetwork2.git")
  311. (commit commit)))
  312. (file-name (string-append name "-" commit))
  313. (sha256
  314. (base32
  315. "09hvy9mf4dnmkb8qg49viffzrxk53m2kr4r955m84dxaa5pdrjhd"))))
  316. (propagated-inputs `(
  317. ("python" ,python-2) ;; probably superfluous
  318. ("r" ,r)
  319. ))
  320. (inputs `(
  321. ("mysql" ,mysql)
  322. ("gemma" ,gemma)
  323. ("nginx" ,nginx)
  324. ("python2-flask" ,python2-flask)
  325. ("python2-htmlgen-gn" ,python2-htmlgen-gn)
  326. ("python2-jinja2" ,python2-jinja2)
  327. ("python2-sqlalchemy" ,python2-sqlalchemy)
  328. ("python2-flask-sqlalchemy" ,python2-flask-sqlalchemy)
  329. ("python2-setuptools" ,python2-setuptools)
  330. ("python2-scipy" ,python2-scipy)
  331. ;; looks like python-numarray is not needed
  332. ("python2-mysqlclient" ,python2-mysqlclient)
  333. ("python2-numarray" ,python2-numarray)
  334. ("python2-numpy" ,python2-numpy)
  335. ("python2-pandas" ,python2-pandas)
  336. ("python2-parallel" ,python2-parallel)
  337. ("python2-passlib" ,python2-passlib)
  338. ("python2-piddle" ,python2-piddle)
  339. ("python2-redis" ,python2-redis)
  340. ("python2-requests" ,python2-requests)
  341. ("python2-rpy2" ,python2-rpy2)
  342. ("python2-scipy" ,python2-scipy)
  343. ("python2-simplejson" ,python2-simplejson)
  344. ("python2-pyyaml" ,python2-pyyaml)
  345. ("python-xlsxwriter" ,python-xlsxwriter)
  346. ;; python-yolk is not needed
  347. ("plink" ,plink)
  348. ("qtlreaper" ,qtlreaper)
  349. ("r-qtl" ,r-qtl)
  350. ))
  351. (build-system python-build-system)
  352. (arguments
  353. `(#:python ,python-2
  354. #:tests? #f)) ; no 'setup.py test'
  355. (home-page "http://genenetwork.org/")
  356. (synopsis "Full genenetwork services")
  357. (description "Genenetwork installation sumo.")
  358. (license license:agpl3+))))