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

Ad-hoc modifications with provenance tracking #265

Open
ElDeveloper opened this issue May 19, 2017 · 2 comments
Open

Ad-hoc modifications with provenance tracking #265

ElDeveloper opened this issue May 19, 2017 · 2 comments

Comments

@ElDeveloper
Copy link
Member

ElDeveloper commented May 19, 2017

Improvement Description
Perhaps this breaks some fundamental assumption about artifact provenance, but it would be useful to still be able to keep track of the provenance of an artifact after some processing has been applied.

For example, I have a tree artifact that I load, set all the missing branch lengths to zero, and then save it back to an artifact. The resulting artifact has now lost all the provenance information. It would be useful if I could annotate in the provenance, that the changes that I made have the intention of "Set missing branch lengths to zero".

a = Artifact.load('tree.qza')
t = a.view(TreeNode)

for n in t.traverse():
    if n.length is None:
        n.length = 0

patched_tree = Artifact.import_data('Phylogeny[Rooted]', t)
patched_tree.save('tree.patched.qza')
@ebolyen
Copy link
Member

ebolyen commented May 19, 2017

Maybe there could be some kind of action where you could say:

patched_results = qiime2.UnknownAction("Describe a thing", 
                                       inputs=[a, b, c], 
                                       results=[('TypeX', view_x), ('TypeY', view_y)])

Or maybe the import has already been done, so it would take the patched_tree in your example.

@ElDeveloper
Copy link
Member Author

ElDeveloper commented May 19, 2017

Something like this would be rather handy, my overall goal is to be able to make a note that I made a change, but that the originating object has a particular history associated with it. This should likely be highlighted somehow in view.qiime2.org.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants