gnu: Add python-pyfasta.
* gnu/packages/bioinformatics.scm (python-pyfasta): New variable. Change-Id: Ib2ab0a6eb250309633d5be33c18409227bce84ba
This commit is contained in:
parent
f7373261e9
commit
ebad9d6c0e
1 changed files with 78 additions and 6 deletions
|
@ -4820,17 +4820,89 @@ gkm-SVM.")
|
||||||
accessing bigWig files.")
|
accessing bigWig files.")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
|
(define-public python-pyfasta
|
||||||
|
;; The release on pypi does not contain the test data files.
|
||||||
|
(let ((commit "c2f0611c5311f1b1466f2d56560447898b4a8b03")
|
||||||
|
(revision "1"))
|
||||||
|
(package
|
||||||
|
(name "python-pyfasta")
|
||||||
|
(version (git-version "0.5.2" revision commit))
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/brentp/pyfasta")
|
||||||
|
(commit commit)))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0a189id3fbv88gssyk6adbmz2ll1mqpmyw8vxmx3fi955gvaq9j7"))))
|
||||||
|
(build-system pyproject-build-system)
|
||||||
|
(arguments
|
||||||
|
(list
|
||||||
|
#:phases
|
||||||
|
'(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'python3.10-compat
|
||||||
|
(lambda _
|
||||||
|
(substitute* "pyfasta/__init__.py"
|
||||||
|
(("from fasta import")
|
||||||
|
"from pyfasta.fasta import")
|
||||||
|
(("from records import")
|
||||||
|
"from pyfasta.records import")
|
||||||
|
(("from split_fasta import")
|
||||||
|
"from pyfasta.split_fasta import")
|
||||||
|
(("in f.iteritems")
|
||||||
|
"in f.items"))
|
||||||
|
(substitute* "pyfasta/fasta.py"
|
||||||
|
(("from collections import Mapping")
|
||||||
|
"from collections.abc import Mapping")
|
||||||
|
(("from records import")
|
||||||
|
"from pyfasta.records import"))
|
||||||
|
(substitute* "pyfasta/records.py"
|
||||||
|
(("cPickle") "pickle")
|
||||||
|
(("\\(int, long\\)")
|
||||||
|
"(int, int)")
|
||||||
|
;; XXX: it's not clear if this is really correct.
|
||||||
|
(("buffer\\(self\\)")
|
||||||
|
"memoryview(bytes(str(self), encoding='utf-8'))")
|
||||||
|
(("sys.maxint") "sys.maxsize"))
|
||||||
|
(substitute* "pyfasta/split_fasta.py"
|
||||||
|
(("from cStringIO import")
|
||||||
|
"from io import")
|
||||||
|
(("in lens.iteritems") "in lens.items"))
|
||||||
|
(substitute* "tests/test_all.py"
|
||||||
|
(("f.keys\\(\\)\\) == \\['a-extra'")
|
||||||
|
"list(f.keys())) == ['a-extra'")
|
||||||
|
(("f.iterkeys\\(\\)") "iter(f.keys())")
|
||||||
|
(("tests/data/" m)
|
||||||
|
(string-append (getcwd) "/" m))))))))
|
||||||
|
(propagated-inputs (list python-numpy))
|
||||||
|
(native-inputs (list python-nose))
|
||||||
|
(home-page "https://github.com/brentp/pyfasta/")
|
||||||
|
(synopsis "Pythonic access to fasta sequence files")
|
||||||
|
(description
|
||||||
|
"This library provides fast, memory-efficient, pythonic (and
|
||||||
|
command-line) access to fasta sequence files. It stores a flattened version
|
||||||
|
of a fasta sequence file without spaces or headers and uses either a
|
||||||
|
@code{mmap} in numpy binary format or @code{fseek}/@code{fread} so the
|
||||||
|
sequence data is never read into memory. It saves a pickle (@code{.gdx}) of
|
||||||
|
the start and stop (for @code{fseek}/@code{mmap}) locations of each header in
|
||||||
|
the fasta file for internal use.
|
||||||
|
|
||||||
|
Note that this package has been deprecated in favor of @code{pyfaidx}.")
|
||||||
|
(license license:expat))))
|
||||||
|
|
||||||
(define-public python-schema-salad
|
(define-public python-schema-salad
|
||||||
(package
|
(package
|
||||||
(name "python-schema-salad")
|
(name "python-schema-salad")
|
||||||
(version "8.2.20211116214159")
|
(version "8.2.20211116214159")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (pypi-uri "schema-salad" version))
|
(uri (pypi-uri "schema-salad" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"005dh2y45x92zl8sf2sqjmfvcqr4hrz8dfckgkckv87003v7lwqc"))))
|
"005dh2y45x92zl8sf2sqjmfvcqr4hrz8dfckgkckv87003v7lwqc"))))
|
||||||
(build-system pyproject-build-system)
|
(build-system pyproject-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
`(#:phases
|
||||||
|
|
Reference in a new issue