xphyle
xphyle: Extraordinarily simple file handling - Published in JOSS (2017)
Science Score: 100.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 5 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org, zenodo.org -
✓Committers with academic emails
1 of 4 committers (25.0%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Repository
Python library that facilitates opening, reading, and writing files (and file-like entities like URLs and streams) agnostic of compression format. (production)
Basic Info
Statistics
- Stars: 23
- Watchers: 3
- Forks: 3
- Open Issues: 16
- Releases: 32
Metadata Files
README.md
xphyle: extraordinarily simple file handling

xphyle is a small python library that makes it easy to open compressed files. Most importantly, xphyle will use the appropriate program (e.g. 'gzip') to compress/decompress a file if it is available on your system; this is almost always faster than using the corresponding python library. xphyle also provides methods that simplify common file I/O operations.
Recent version of xphyle (4.0.0+) require python 3.6. Older versions of xphyle support python 3.4+.
Please note that xphyle may work on Windows, but it is not tested.
Installation
pip install xphyle
Building from source
Clone this repository and run
make
Example usages:
```python from xphyle import * from xphyle.paths import STDIN, STDOUT
Open a compressed file...
myfile = xopen('infile.gz')
...or a compressed stream
e.g. gzip -c afile | python my_program.py
stdin = xopen(STDIN)
Easily write to the stdin of a subprocess
with open_('|cat', 'wt') as process: process.write('foo')
We have to tell xopen what kind of compression
to use when writing to stdout
stdout = xopen(STDOUT, compression='gz')
The open_ method ensures that the file is usable with the with keyword.
Print all lines in a compressed file...
with open_('infile.gz') as myfile: for line in myfile: print(line)
... or a compressed URL
with open_('http://foo.com/myfile.gz') as myfile: for line in myfile: print(line)
Transparently handle paths and file objects
def dostuff(pathorfile): with open(pathor_file) as myfile: for line in myfile: print(line)
Read all lines in a compressed file into a list
from xphyle.utils import readlines lines = list(readlines('infile.gz'))
Sum the rows in a compressed file where each line is an integer value
total = sum(read_lines('infile.gz', convert=int)) ```
See the Documentation for full usage information.
Supported compression formats
gzip(usesigziporpigzif available)bgzipbzip2(usespbzip2if available)lzmazstd
Issues
Please report bugs and request enhancements using the issue tracker.
Roadmap
Future releases are mapped out using GitHub Projects.
Citing xphyle
Acknowledgements
- Dependencies scanned by PyUp.io
- Thanks to @ctb for reviewing the xphyle paper
Owner
- Name: John Didion
- Login: jdidion
- Kind: user
- Location: Livermore, CA
- Company: Apton
- Website: http://john.didion.net
- Twitter: jdidion
- Repositories: 36
- Profile: https://github.com/jdidion
I am a programmer and bioinformatician. I develop and contribute to several open-source genomics projects.
JOSS Publication
xphyle: Extraordinarily simple file handling
Tags
io files pythonCitation (CITATION)
Didion, JP (2017) xphyle: Extraordinarily simple file handling. Journal of Open Source Software; [doi:10.21105/joss.00255](https://doi.org/10.21105/joss.00255)
@article{Didion2017,
doi = {10.21105/joss.00255},
url = {https://doi.org/10.21105/joss.00255},
year = {2017},
publisher = {The Open Journal},
volume = {2},
number = {14},
pages = {255},
author = {John Didion},
title = {xphyle: Extraordinarily simple file handling},
journal = {Journal of Open Source Software}
}
GitHub Events
Total
- Issues event: 1
- Watch event: 3
- Fork event: 1
Last Year
- Issues event: 1
- Watch event: 3
- Fork event: 1
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| John Didion | g****b@d****t | 230 |
| Didion, John (NIH/NHGRI) [F] | j****n@n****v | 79 |
| pyup-bot | g****t@p****o | 12 |
| C. Titus Brown | t****s@i****g | 2 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 24
- Total pull requests: 83
- Average time to close issues: 4 months
- Average time to close pull requests: about 1 month
- Total issue authors: 5
- Total pull request authors: 3
- Average comments per issue: 1.21
- Average comments per pull request: 1.18
- Merged pull requests: 20
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 4
- Average time to close issues: N/A
- Average time to close pull requests: 1 day
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.75
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- jdidion (17)
- ctb (3)
- standage (2)
- adrienyhuel (1)
- dridk (1)
- pyup-bot (1)
Pull Request Authors
- pyup-bot (85)
- jdidion (5)
- ctb (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 172 last-month
-
Total dependent packages: 2
(may contain duplicates) -
Total dependent repositories: 4
(may contain duplicates) - Total versions: 65
- Total maintainers: 1
pypi.org: xphyle
Utilities for working with files.
- Homepage: https://github.com/jdidion/xphyle
- Documentation: https://xphyle.readthedocs.io/
- License: MIT
-
Latest release: 4.4.4
published over 2 years ago
Rankings
Maintainers (1)
conda-forge.org: xphyle
- Homepage: https://github.com/jdidion/xphyle
- License: MIT
-
Latest release: 4.4.2
published about 4 years ago
Rankings
Dependencies
- pokrok ==0.2.0
- sphinx ==4.4.0
- pokrok ==0.2.0
- pokrok *
