Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple associates for a single file fails to create correct map #23

Open
evamaxfield opened this issue Oct 2, 2019 · 0 comments
Open
Labels
bug Something isn't working

Comments

@evamaxfield
Copy link
Contributor

evamaxfield commented Oct 2, 2019

Reproduce with:

import pandas as pd
from quilt3distribute import Dataset

t = pd.DataFrame([
    {
        "FOVId": 1,
        "CellId": 1,
        "FOVReadPath": "overview1.tiff",
        "CellReadPath": "overview1cell1.tiff"
    },
    {
        "FOVId": 1,
        "CellId": 2,
        "FOVReadPath": "overview1.tiff",
        "CellReadPath": "overview1cell2.tiff"
    },
    {
        "FOVId": 1,
        "CellId": 3,
        "FOVReadPath": "overview1.tiff",
        "CellReadPath": "overview1cell3.tiff"
    },
])

d = Dataset(
    dataset=t,
    name="single_cell_examples",
    package_owner="jacksonb",
    readme_path="README.md"
)

d.set_metadata_columns(["FOVId", "CellId"])

pkg = d.distribute()

Results in package:

(local Package)
 └─README.md
 └─CellReadPath/
   └─28aa220b_overview1cell2.tiff
   └─bd5f82f0_overview1cell3.tiff
   └─e95c4684_overview1cell1.tiff
 └─metadata.csv
 └─FOVReadPath/
   └─a194ec50_overview1.tiff
 └─referenced_files/
   └─example.csv

pkg["FOVReadPath"]["a194ec50_overview1.tiff"].meta returns:

{
    "FOVId": 1,
    "CellId": [1, 2, 3],
    "associates": {
        "FOVReadPath": "overview-images/a194ec50_overview1.tiff",
        "CellReadPath": "cell-images/bd5f82f0_overview1cell3.tiff"
    }
}

When it should return:

{
    "FOVId": 1,
    "CellId": [1, 2, 3],
    "associates": {
        "FOVReadPath": "overview-images/a194ec50_overview1.tiff",
        "CellReadPath": [
            "cell-images/e95c4684_overview1cell1.tiff",
            "cell-images/28aa220b_overview1cell2.tiff",
            "cell-images/bd5f82f0_overview1cell3.tiff"
        ]
    }
}
@evamaxfield evamaxfield added the bug Something isn't working label Oct 2, 2019
@evamaxfield evamaxfield self-assigned this Oct 2, 2019
@evamaxfield evamaxfield removed their assignment Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant