starfile

STAR file I/O in Python

https://github.com/teamtomo/starfile

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    3 of 17 committers (17.6%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.1%) to scientific vocabulary

Keywords from Contributors

napari interactive serializer packaging network-simulation hacking autograding observability embedded optim
Last synced: 10 months ago · JSON representation

Repository

STAR file I/O in Python

Basic Info
Statistics
  • Stars: 51
  • Watchers: 4
  • Forks: 20
  • Open Issues: 6
  • Releases: 14
Created about 6 years ago · Last pushed 11 months ago
Metadata Files
Readme License

README.md

starfile

License PyPI Python Version CI codecov

starfile is a package for reading and writing STAR files in Python.

starfile can be used interactively to inspect/explore files or in scripts and larger software packages to provide basic STAR file I/O functions. Data is exposed as simple python dictionaries or pandas dataframes.

This package was designed principally for compatibility with files generated by RELION.

For more information on working with dataframes, please see the pandas docs.

For starfile specific documentation, see teamtomo.org/starfile


Quickstart

For the following file particles.star with a single data block

```txt data_particles

loop_ rlnCoordinateX #1 _rlnCoordinateY #2 _rlnCoordinateZ #3 _rlnAngleRot #4 _rlnAngleTilt #5 _rlnAnglePsi #6 _rlnMicrographName #7 91.798700 83.622600 203.341030 -51.740000 173.930000 32.971000 0110.00Apx.mrc 97.635800 80.437000 203.136160 141.500000 171.760000 -134.680000 0110.00Apx.mrc 92.415200 88.842700 210.663900 -78.750000 173.930000 87.263200 0110.00Apx.mrc 94.607830 93.135410 205.425960 -85.215000 167.170000 85.632200 0110.00Apx.mrc 86.187800 80.125400 204.558750 14.910000 163.260000 -16.030000 0110.00Apx.mrc 91.824240 76.738300 203.794280 39.740000 168.410000 -57.250000 0110.00Apx.mrc 98.253300 73.530100 203.856030 73.950000 166.380000 -84.640000 0110.00Apx.mrc 101.303500 80.290800 194.790400 -178.878000 166.090000 73.181000 01_10.00Apx.mrc ```

Read the file

```python

import starfile

df = starfile.read('particles.star') ```

Interact with the data

python df['rlnCoordinateX'] += 10 df.head() txt rlnCoordinateX rlnCoordinateY rlnCoordinateZ rlnAngleRot rlnAngleTilt rlnAnglePsi rlnMicrographName 0 101.79870 83.62260 203.34103 -51.740 173.93 32.9710 01_10.00Apx.mrc 1 107.63580 80.43700 203.13616 141.500 171.76 -134.6800 01_10.00Apx.mrc 2 102.41520 88.84270 210.66390 -78.750 173.93 87.2632 01_10.00Apx.mrc 3 104.60783 93.13541 205.42596 -85.215 167.17 85.6322 01_10.00Apx.mrc 4 96.18780 80.12540 204.55875 14.910 163.26 -16.0300 01_10.00Apx.mrc

Save the (modified) data to file

python starfile.write(df, 'modified_particles.star')

For more advanced usage please check out the examples.


Installation

shell pip install starfile

Owner

  • Name: teamtomo
  • Login: teamtomo
  • Kind: organization

GitHub Events

Total
  • Create event: 9
  • Release event: 3
  • Issues event: 15
  • Watch event: 7
  • Delete event: 3
  • Member event: 1
  • Issue comment event: 42
  • Push event: 15
  • Pull request review event: 4
  • Pull request event: 17
  • Fork event: 3
Last Year
  • Create event: 9
  • Release event: 3
  • Issues event: 15
  • Watch event: 7
  • Delete event: 3
  • Member event: 1
  • Issue comment event: 42
  • Push event: 15
  • Pull request review event: 4
  • Pull request event: 17
  • Fork event: 3

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 190
  • Total Committers: 17
  • Avg Commits per committer: 11.176
  • Development Distribution Score (DDS): 0.2
Past Year
  • Commits: 19
  • Committers: 9
  • Avg Commits per committer: 2.111
  • Development Distribution Score (DDS): 0.684
Top Committers
Name Email Commits
Alister Burt a****t@g****m 152
Lorenzo Gaifas b****g@g****m 9
James Hooker j****r@m****k 6
dependabot[bot] 4****] 6
Johannes Elferich j****3@h****m 4
Hanjin Liu 4****u 2
Robert Bücker r****r@m****e 1
Alan R Lowe c****e@a****k 1
Andreas Schenk a****k@s****h 1
Brady Johnston 3****n 1
EuanPyle e****e@g****m 1
Guillaume Gaullier g****e@g****g 1
Huw Jenkins h****s 1
Josh Dickerson j****n@m****k 1
Ray Berkeley 3****y 1
Ryan Feathers 8****s 1
a 4****s 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 33
  • Total pull requests: 49
  • Average time to close issues: 23 days
  • Average time to close pull requests: 4 days
  • Total issue authors: 20
  • Total pull request authors: 18
  • Average comments per issue: 3.42
  • Average comments per pull request: 1.82
  • Merged pull requests: 46
  • Bot issues: 3
  • Bot pull requests: 5
Past Year
  • Issues: 8
  • Pull requests: 8
  • Average time to close issues: 27 days
  • Average time to close pull requests: 1 day
  • Issue authors: 7
  • Pull request authors: 5
  • Average comments per issue: 3.0
  • Average comments per pull request: 2.63
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • alisterburt (6)
  • github-actions[bot] (3)
  • rsanchezgarc (2)
  • inter1965 (2)
  • jojoelfe (2)
  • bingwang14 (2)
  • ryanfeathers (2)
  • lglass (1)
  • elemeng (1)
  • logicvay2010 (1)
  • hanjinliu (1)
  • chris-langfield (1)
  • BradyAJohnston (1)
  • samuelhaysom (1)
  • mgflast (1)
Pull Request Authors
  • alisterburt (21)
  • dependabot[bot] (11)
  • jojoelfe (7)
  • hanjinliu (4)
  • brisvag (4)
  • EuanPyle (3)
  • huwjenkins (2)
  • d-j-hatton (2)
  • sjrothfuss (2)
  • ryanfeathers (2)
  • jahooker (2)
  • andschenk (2)
  • MrCurtis (1)
  • ray-berkeley (1)
  • robertbuecker (1)
Top Labels
Issue Labels
bug (7) enhancement (6) refactor (2) help wanted (2) question (2) good first issue (2) regression (1)
Pull Request Labels
dependencies (11)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 15,253 last-month
  • Total docker downloads: 38
  • Total dependent packages: 28
  • Total dependent repositories: 12
  • Total versions: 36
  • Total maintainers: 2
pypi.org: starfile

STAR file I/O in Python

  • Versions: 36
  • Dependent Packages: 28
  • Dependent Repositories: 12
  • Downloads: 15,253 Last month
  • Docker Downloads: 38
Rankings
Dependent packages count: 0.6%
Dependent repos count: 4.2%
Downloads: 4.5%
Average: 6.3%
Forks count: 10.9%
Stargazers count: 11.1%
Maintainers (2)
Last synced: 10 months ago

Dependencies

.github/workflows/build-and-deploy-docs.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • peaceiris/actions-gh-pages v3 composite
.github/workflows/test_and_deploy.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • codecov/codecov-action v1 composite
pyproject.toml pypi
requirements.txt pypi
setup.py pypi