Skip to content

Commit

Permalink
add sample data using HIV dataset (#176)
Browse files Browse the repository at this point in the history
* add sample data using HIV dataset

* use new zenodo entry
  • Loading branch information
brisvag authored Jul 15, 2024
1 parent 591bd2b commit fd1f7c5
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/blik/napari.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ contributions:
- id: blik.read_files
python_name: blik.reader:get_reader
title: "Open files with blik"
# samples
- id: blik.sample_hiv_dataset
python_name: blik.remote_data:load_hiv_dataset
title: "Open sample HIV VLPs dataset"
# writers
- id: blik.write_image
python_name: blik.writer:write_image
Expand Down Expand Up @@ -135,3 +139,8 @@ contributions:
display_name: "Gaussian filter"
- command: blik.power_spectrum
display_name: "Power spectrum"

sample_data:
- command: blik.sample_hiv_dataset
key: blik_hiv_dataset
display_name: "Tomogram and particles of HIV VLPs"
25 changes: 25 additions & 0 deletions src/blik/remote_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import pooch

from .reader import read_layers


def load_hiv_dataset():
reg_tomo = pooch.create(
path=pooch.os_cache("blik"),
base_url="doi:10.5281/zenodo.6504891/",
)
reg_tomo.load_registry_from_doi()

# made separate zenodo entry for star file with pixel size
reg_picks = pooch.create(
path=pooch.os_cache("blik"),
base_url="doi:10.5281/zenodo.12743309/",
)
reg_picks.load_registry_from_doi()

paths = [
reg_tomo.fetch("01_10.00Apx.mrc"),
reg_picks.fetch("01_10.00Apx.star"),
]

return read_layers(*paths)

0 comments on commit fd1f7c5

Please sign in to comment.