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.

367 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 gcc)
  25. #:use-module (gnu packages graphviz)
  26. #:use-module (gnu packages java)
  27. #:use-module (gnu packages linux)
  28. #:use-module (gnu packages machine-learning)
  29. #:use-module (gnu packages maths)
  30. #:use-module (gnu packages ncurses)
  31. #:use-module (gnu packages perl)
  32. #:use-module (gnu packages pkg-config)
  33. #:use-module (gnu packages popt)
  34. #:use-module (gnu packages protobuf)
  35. #:use-module (gnu packages python)
  36. #:use-module (gnu packages ruby)
  37. #:use-module (gnu packages statistics)
  38. #:use-module (gnu packages tbb)
  39. #:use-module (gnu packages textutils)
  40. #:use-module (gnu packages vim)
  41. #:use-module (gnu packages web)
  42. #:use-module (gnu packages xml)
  43. #:use-module (gnu packages zip)
  44. #:use-module (gnu packages bootstrap)
  45. #:use-module (gn packages python)
  46. #:use-module (srfi srfi-1))
  47. (define-public my-deploy
  48. (package
  49. (name "my-deploy")
  50. (version "0.0.1")
  51. (source #f)
  52. (build-system trivial-build-system)
  53. (arguments
  54. `(#:guile ,%bootstrap-guile
  55. #:modules ((guix build utils))
  56. #:builder
  57. (let* ((out (assoc-ref %outputs "out"))
  58. (bash (assoc-ref %build-inputs "bash"))
  59. (foo (string-append out "/foo")))
  60. (begin
  61. (use-modules (guix build utils))
  62. (mkdir out)
  63. (call-with-output-file foo
  64. (lambda (p)
  65. (format p
  66. "#!~a~%echo \"${GUIX_FOO} ${GUIX_BAR}\"~%"
  67. bash)))
  68. (chmod foo #o777)
  69. ;; wrap-program uses `which' to find bash for the wrapper
  70. ;; shebang, but it can't know about the bootstrap bash in
  71. ;; the store, since it's not named "bash". Help it out a
  72. ;; bit by providing a symlink it this package's output.
  73. (symlink bash (string-append out "/bash"))
  74. (setenv "PATH" out)
  75. (wrap-program foo `("GUIX_FOO" prefix ("hello")))
  76. (wrap-program foo `("GUIX_BAR" prefix ("world")))
  77. #t))))
  78. (inputs `(("bash" ,(search-bootstrap-binary "bash"
  79. (%current-system)))))
  80. (home-page #f)
  81. (synopsis #f)
  82. (description #f)
  83. (license #f)))
  84. (define-public r-wgcna
  85. (package
  86. (name "r-wgcna")
  87. (version "1.48")
  88. (source
  89. (origin
  90. (method url-fetch)
  91. (uri (cran-uri "WGCNA" version))
  92. (sha256
  93. (base32
  94. "18yl2v3s279saq318vd5hlwnqfm89rxmjjji778d2d26vviaf6bn"))))
  95. (properties `((upstream-name . "WGCNA")))
  96. (build-system r-build-system)
  97. ;; (propagated-inputs
  98. ;; `( ;; ("r-annotationdbi" ,r-annotationdbi)
  99. ;; ("r-doparallel" ,r-doparallel)
  100. ;; ("r-dynamictreecut" ,r-dynamictreecut)
  101. ;; ("r-fastcluster" ,r-fastcluster)
  102. ;; ("r-foreach" ,r-foreach)
  103. ;; ("r-go.db" ,r-go.db)
  104. ;; ("r-grdevices" ,r-grdevices)
  105. ;; ("r-hmisc" ,r-hmisc)
  106. ;; ("r-impute" ,r-impute)
  107. ;; ("r-matrixstats" ,r-matrixstats)
  108. ;; ("r-parallel" ,r-parallel)
  109. ;; ("r-preprocesscore" ,r-preprocesscore)
  110. ;; ("r-splines" ,r-splines)
  111. ;; ("r-stats" ,r-stats)
  112. ;; ("r-survival" ,r-survival)
  113. ;; ("r-utils" ,r-utils)))
  114. (home-page
  115. "http://www.genetics.ucla.edu/labs/horvath/CoexpressionNetwork/Rpackages/WGCNA/")
  116. (synopsis
  117. "Weighted Correlation Network Analysis")
  118. (description
  119. "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.")
  120. (license license:gpl2+)))
  121. (define-public qtlreaper
  122. (package
  123. (name "qtlreaper")
  124. (version "1.1.1")
  125. (source
  126. (origin
  127. (method url-fetch)
  128. (uri (string-append
  129. "mirror://sourceforge/qtlreaper/qtlreaper-" version ".tar.gz"
  130. ;; "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"))
  131. ))
  132. (file-name (string-append name "-" version ".tar.gz"))
  133. (sha256
  134. (base32
  135. "0rbf030940nbbbkggdq2dxiy3c0jv8l4y3vvyfxhqimgj0qv3l1x"))))
  136. (build-system python-build-system)
  137. ;; (native-inputs
  138. ;; `(("python-setuptools" ,python-setuptools)))
  139. (arguments
  140. `(#:python ,python-2
  141. #:tests? #f)) ; no 'setup.py test'
  142. (home-page "http://qtlreaper.sourceforge.net/")
  143. (synopsis "Tool for scanning expression data for QTLs")
  144. (description
  145. "It is essentially the batch-oriented version of WebQTL. It
  146. requires, as input, expression data from members of a set of
  147. recombinant inbred lines and genotype information for the same
  148. lines. It searches for an association between each expression trait
  149. and all genotypes and evaluates that association by a permutation
  150. test. For the permutation test, it performs only as many permutations
  151. as are necessary to define the empirical P-value to a reasonable
  152. precision. It also performs bootstrap resampling to estimate the
  153. confidence region for the location of a putative QTL.")
  154. (license license:gpl2)))
  155. (define-public plink2
  156. (package
  157. (name "plink2")
  158. (version "1.90b3")
  159. (source
  160. (origin
  161. (method url-fetch)
  162. ;; https://github.com/chrchang/plink-ng/archive/v1.90b3.tar.gz
  163. (uri (string-append
  164. "https://github.com/chrchang/plink-ng/archive/v"
  165. version ".tar.gz"))
  166. (sha256
  167. (base32 "03fzib1al5qkr9vxv63wxmv6y2pfb1rmir0h8jpi72r87hczqjig"))
  168. (patches (list (search-patch "plink-ng-Makefile-zlib.patch")))))
  169. (build-system gnu-build-system)
  170. (arguments
  171. '(#:tests? #f ;no "check" target
  172. #:phases
  173. (modify-phases %standard-phases
  174. (delete 'configure)
  175. (replace 'build
  176. (lambda _
  177. (zero? (system* "make" "-f" "Makefile.std"))
  178. ))
  179. (replace 'install
  180. (lambda* (#:key outputs #:allow-other-keys)
  181. (let ((bin (string-append (assoc-ref outputs "out")
  182. "/bin/")))
  183. (install-file "plink2" bin)
  184. #t))))))
  185. (inputs
  186. `(("zlib" ,zlib)
  187. ("openblas" ,openblas)
  188. ("atlas" ,atlas)
  189. ("lapack" ,lapack)
  190. ("gfortran" ,gfortran)
  191. ))
  192. (native-inputs
  193. `(("unzip" ,unzip)))
  194. (home-page "https://www.cog-genomics.org/plink2")
  195. (synopsis "Whole genome association analysis toolset")
  196. (description
  197. "PLINK is a whole genome association analysis toolset, designed to
  198. perform a range of basic, large-scale analyses in a computationally efficient
  199. manner. The focus of PLINK is purely on analysis of genotype/phenotype data,
  200. so there is no support for steps prior to this (e.g. study design and
  201. planning, generating genotype or CNV calls from raw data). Through
  202. integration with gPLINK and Haploview, there is some support for the
  203. subsequent visualization, annotation and storage of results.")
  204. ;; Code is released under GPLv2, except for fisher.h, which is under
  205. ;; LGPLv2.1+
  206. (license (list license:gpl2 license:lgpl2.1+))))
  207. (define-public gemma
  208. (let ((commit "2de4bfab3"))
  209. (package
  210. (name "gemma")
  211. (version (string-append "0.9.5-" commit ))
  212. (source (origin
  213. (method git-fetch)
  214. (uri (git-reference
  215. (url "https://github.com/genenetwork/GEMMA.git")
  216. (commit commit)))
  217. (file-name (string-append name "-" commit))
  218. (sha256
  219. (base32
  220. "1drffdgwbzgiw9sf55ghl3zjv58f8i9kfz0zys5mp6n06syp4ira"))))
  221. (inputs `(
  222. ("gsl" ,gsl)
  223. ("lapack" ,lapack)
  224. ("zlib" ,zlib)
  225. ))
  226. (build-system gnu-build-system)
  227. (arguments
  228. `(#:make-flags '(" FORCE_DYNAMIC=1")
  229. #:phases
  230. (modify-phases %standard-phases
  231. (delete 'configure)
  232. (add-before 'build 'bin-mkdir
  233. (lambda _
  234. (mkdir-p "bin")
  235. ))
  236. (replace 'install
  237. (lambda* (#:key outputs #:allow-other-keys)
  238. (let ((out (assoc-ref outputs "out")))
  239. (install-file "bin/gemma" (string-append out "/bin"))))))
  240. #:tests? #f))
  241. (home-page "")
  242. (synopsis "Tool for genome-wide efficient mixed model association")
  243. (description "GEMMA is the software implementing the Genome-wide
  244. Efficient Mixed Model Association algorithm for a standard linear
  245. mixed model and some of its close relatives for genome-wide
  246. association studies (GWAS).")
  247. (license license:gpl3))))
  248. (define-public genenetwork1
  249. (let ((commit "d622c803b"))
  250. (package
  251. (name "genenetwork1")
  252. (version (string-append "1.0-" commit ))
  253. (source (origin
  254. (method git-fetch)
  255. (uri (git-reference
  256. (url "https://github.com/genenetwork/genenetwork.git")
  257. ;; (url "https://github.com/pjotrp/genenetwork.git")
  258. (commit commit)))
  259. (file-name (string-append name "-" commit))
  260. (sha256
  261. (base32
  262. "14fzfcm4vl20mlhxjslfa01i1nmxpk8lbxmfvpq6dyfc22ir62py"))))
  263. (propagated-inputs `(
  264. ("python" ,python-2) ;; probably superfluous
  265. ("r" ,r)
  266. ))
  267. (inputs `(
  268. ;; http://spring211.uthsc.edu/gn/thirdparty.tbz
  269. ;; graphviz-2.22.2 htmlgen json numarray-1.5.2 piddle PIL pp-1.5.7 pyx pyXLWriter svg
  270. ("mysql" ,mysql)
  271. ("nginx" ,nginx)
  272. ("graphviz" ,graphviz)
  273. ; ("python2-jinja2" ,python2-jinja2)
  274. ; ("python2-sqlalchemy" ,python2-sqlalchemy)
  275. ; ("python2-setuptools" ,python2-setuptools)
  276. ; ("python2-scipy" ,python2-scipy)
  277. ;; looks like python-numarray is not needed
  278. ; ("python2-numpy" ,python2-numpy)
  279. ; ("python2-pandas" ,python2-pandas)
  280. ; ("python2-passlib" ,python2-passlib)
  281. ; ("python2-redis" ,python2-redis)
  282. ; ("python2-requests" ,python2-requests)
  283. ; ("python2-simplejson" ,python2-simplejson)
  284. ; ("python2-pyyaml" ,python2-pyyaml)
  285. ;; python-yolk is not needed
  286. ("python2-pil" ,python2-pil)
  287. ("python2-numarray" ,python2-numarray)
  288. ("plink" ,plink) ;; gn1
  289. ; ("r-qtl" ,r-qtl)
  290. ))
  291. (build-system python-build-system)
  292. (arguments
  293. `(#:python ,python-2
  294. #:tests? #f)) ; no 'setup.py test'
  295. (home-page "http://genenetwork.org/")
  296. (synopsis "Full genenetwork services")
  297. (description "Genenetwork installation sumo.")
  298. (license license:agpl3+))))
  299. (define-public genenetwork2
  300. (let ((commit "9e9475053"))
  301. (package
  302. (name "genenetwork2")
  303. (version (string-append "2.0-" commit ))
  304. (source (origin
  305. (method git-fetch)
  306. (uri (git-reference
  307. ;; (url "https://github.com/genenetwork/genenetwork2.git")
  308. (url "https://github.com/pjotrp/genenetwork2.git")
  309. (commit commit)))
  310. (file-name (string-append name "-" commit))
  311. (sha256
  312. (base32
  313. "09hvy9mf4dnmkb8qg49viffzrxk53m2kr4r955m84dxaa5pdrjhd"))))
  314. (propagated-inputs `(
  315. ("python" ,python-2) ;; probably superfluous
  316. ("r" ,r)
  317. ))
  318. (inputs `(
  319. ("mysql" ,mysql)
  320. ("gemma" ,gemma)
  321. ("nginx" ,nginx)
  322. ("python2-flask" ,python2-flask)
  323. ("python2-htmlgen-gn" ,python2-htmlgen-gn)
  324. ("python2-jinja2" ,python2-jinja2)
  325. ("python2-sqlalchemy" ,python2-sqlalchemy)
  326. ("python2-flask-sqlalchemy" ,python2-flask-sqlalchemy)
  327. ("python2-setuptools" ,python2-setuptools)
  328. ("python2-scipy" ,python2-scipy)
  329. ;; looks like python-numarray is not needed
  330. ("python2-mysqlclient" ,python2-mysqlclient)
  331. ("python2-numarray" ,python2-numarray)
  332. ("python2-numpy" ,python2-numpy)
  333. ("python2-pandas" ,python2-pandas)
  334. ("python2-parallel" ,python2-parallel)
  335. ("python2-passlib" ,python2-passlib)
  336. ("python2-piddle" ,python2-piddle)
  337. ("python2-redis" ,python2-redis)
  338. ("python2-requests" ,python2-requests)
  339. ("python2-rpy2" ,python2-rpy2)
  340. ("python2-scipy" ,python2-scipy)
  341. ("python2-simplejson" ,python2-simplejson)
  342. ("python2-pyyaml" ,python2-pyyaml)
  343. ("python-xlsxwriter" ,python-xlsxwriter)
  344. ;; python-yolk is not needed
  345. ("plink" ,plink)
  346. ("qtlreaper" ,qtlreaper)
  347. ("r-qtl" ,r-qtl)
  348. ))
  349. (build-system python-build-system)
  350. (arguments
  351. `(#:python ,python-2
  352. #:tests? #f)) ; no 'setup.py test'
  353. (home-page "http://genenetwork.org/")
  354. (synopsis "Full genenetwork services")
  355. (description "Genenetwork installation sumo.")
  356. (license license:agpl3+))))