Skip to content

Commit

Permalink
Merge pull request #108 from rmarkello/zenodo
Browse files Browse the repository at this point in the history
[MNT] Adds framework for Zenodo integration
  • Loading branch information
rmarkello authored Sep 19, 2019
2 parents fd754a9 + 1f9511c commit c90ed85
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"title": "abagen: A toolbox for the Allen Brain Atlas genetics data",
"description": "abagen is a Python toolbox that provides reproducible workflows for fetching and processing the Allen Human Brain Atlas microarray expression data for analysis.",
"creators": [
{
"name": "Markello, Ross",
"affiliation": "Montreal Neurological Institute, McGill University",
"orcid": "0000-0003-1057-1336"
},
{
"name": "Shafiei, Golia",
"affiliation": "Montreal Neurological Institute, McGill University",
"orcid": "0000-0002-2036-5571"
},
{
"name": "Ying-Qiu Zheng",
"affiliation": "Montreal Neurological Institute, McGill University",
"orcid": "0000-0003-1236-0700"
}
],
"keywords": [
"neuroimaging",
"genetics",
"allen institute"
],
"license": "BSD-3-Clause",
"upload_type": "software"
}
50 changes: 50 additions & 0 deletions docs/citing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
.. _citation:

-------------
Citing abagen
-------------

We're thrilled you've found ``abagen`` useful in your work! To make citing
it as easy as possible we have created a `DOI`_ with `Zenodo`_. Since much of
the current codebase was inspired by the workflow laid out in Arnatkevičiūte et
al., 2019, and it all uses data released with Hawrylycz et al., 2012, we ask
that you please cite those papers as well:

.. raw:: html

<script language="javascript">
var version = 'latest';
function fillCitation(){
$('#abagen_version').text(version);
function cb(err, zenodoID) {
getCitation(zenodoID, 'vancouver-brackets-no-et-al', function(err, citation) {
$('#abagen_citation').text(citation);
});
getDOI(zenodoID, function(err, DOI) {
$('#abagen_doi_url').text('https://doi.org/' + DOI);
$('#abagen_doi_url').attr('href', 'https://doi.org/' + DOI);
});
}
if(version == 'latest') {
getLatestIDFromconceptID("", cb);
} else {
getZenodoIDFromTag("", version, cb);
}
}
</script>

<p>
1. <span id="abagen_citation">abagen</span> Available from: <a id="abagen_doi_url" href="https://doi.org/xx.xxxx/zenodo.xxxxxx">xx.xxxx/zenodo.xxxxxx</a>.
<img src onerror='fillCitation()' alt="" />
</p>
<p>
2. Arnatkevic̆iūtė, A., Fulcher, B. D., & Fornito, A. (2019). A practical guide to linking brain-wide gene expression and neuroimaging data. NeuroImage, 189, 353-367. doi:10.1016/j.neuroimage.2019.01.011
</p>
<p>
3. Hawrylycz, M. J., Lein, E. S., Guillozet-Bongaarts, A. L., Shen, E. H., Ng, L., Miller, J. A., … Jones, A. R. (2012). An anatomically comprehensive atlas of the adult human brain transcriptome. Nature, 489(7416), 391–399. doi:10.1038/nature11405
</p>

.. _DOI: https://en.wikipedia.org/wiki/Digital_object_identifier
.. _Zenodo: https://zenodo.org
11 changes: 9 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import os
import sys


# -- Project information -----------------------------------------------------

# Add project name, copyright holder, and author(s)
Expand All @@ -27,6 +28,7 @@
# The full version, including alpha/beta/rc tags
release = abagen.__version__


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
Expand Down Expand Up @@ -73,6 +75,7 @@
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand All @@ -91,14 +94,18 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# CSS files to include
html_css_files = ['theme_overrides.css']
# https://github.com/rtfd/sphinx_rtd_theme/issues/117
def setup(app): # noqa
app.add_stylesheet('theme_overrides.css')
app.add_javascript('https://cdn.rawgit.com/chrisfilo/zenodo.js/v0.1/zenodo.js') # noqa


# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'abagendoc'


# -- Extension configuration -------------------------------------------------
intersphinx_mapping = {
'python': ('https://docs.python.org/3.6', None),
Expand Down

0 comments on commit c90ed85

Please sign in to comment.