Skip to content

Commit

Permalink
Link to the real zipfile on Zenodo
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Mar 19, 2019
1 parent f48d4b9 commit 86b57c9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
2 changes: 2 additions & 0 deletions README.md
@@ -1,3 +1,5 @@
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2598744.svg)](https://doi.org/10.5281/zenodo.2598744)

This tutorial covers the procedure for depositing integrative modeling
studies using [IMP](https://integrativemodeling.org/)
in the [PDB-Dev database](https://pdb-dev.wwpdb.org/) in mmCIF format.
Expand Down
25 changes: 18 additions & 7 deletions doc/mainpage.md
Expand Up @@ -345,16 +345,27 @@ function to map local paths to files in the zipfile at the DOI:
\code{.py}
if '--mmcif' in sys.argv:
import ihm.location
repo = ihm.location.Repository(doi="10.5281/zenodo.1218053", root="..",
url="https://zenodo.org/record/1218053/files/tutorial.zip")
repo = ihm.location.Repository(doi="10.5281/zenodo.2598744", root="../..",
top_directory="salilab-imp_deposition_tutorial-ad8f79d",
url="https://zenodo.org/record/2598744/files/salilab/"
"imp_deposition_tutorial-v0.1.zip")
po.system.update_locations_in_repositories([repo])
\endcode

This assumes that `tutorial.zip` at the given DOI and URL was created by
archiving all files under the parent directory (`..`). Thus the cross-link
file which was previously linked with the local path `../data/polii_xlinks.csv`
can now be found by downloading `tutorial.zip` and extracting
`data/polii_xlinks.csv` from it.
This assumes that the zipfile at the given DOI and URL was created by
archiving all files under the top directory of the
[GitHub repository](https://github.com/salilab/imp_deposition_tutorial)
(`../..` relative to the directory containing the script).
(It was actually created automatically [by Zenodo](https://zenodo.org) when
a new release of this tutorial was created on GitHub. Zenodo puts all the files
in the zipfile under a uniquely-named directory, so we need to set
`top_directory` to match.)

Thus the cross-link file which was previously linked with the local path
`../data/polii_xlinks.csv` can now be found by downloading
`imp_deposition_tutorial-v0.1.zip` and extracting
`salilab-imp_deposition_tutorial-ad8f79d/rnapolii/data/polii_xlinks.csv`
from it.

# Visualization {#visualization}

Expand Down
6 changes: 4 additions & 2 deletions rnapolii/modeling/modeling.py
Expand Up @@ -275,8 +275,10 @@
e.densities.append(den)

# Replace local links with DOIs
repo = ihm.location.Repository(doi="10.5281/zenodo.1218053", root="..",
url="https://zenodo.org/record/1218053/files/tutorial.zip")
repo = ihm.location.Repository(doi="10.5281/zenodo.2598744", root="../..",
top_directory="salilab-imp_deposition_tutorial-ad8f79d",
url="https://zenodo.org/record/2598744/files/salilab/"
"imp_deposition_tutorial-v0.1.zip")
po.system.update_locations_in_repositories([repo])

po.flush()

0 comments on commit 86b57c9

Please sign in to comment.