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

Name tags mini tutorial + References #1324

Merged
merged 17 commits into from Apr 8, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -48,7 +48,7 @@ install: clean ## install dependencies
npm install decktape && \
gem update --system && \
gem install nokogiri:'1.10.0' -- --use-system-libraries --with-xml=$(CONDA_PREFIX)/lib && \
gem install addressable:'2.5.2' jekyll jekyll-feed jekyll-environment-variables jekyll-github-metadata awesome_bot html-proofer pkg-config
gem install addressable:'2.5.2' jekyll jekyll-feed jekyll-environment-variables jekyll-github-metadata jekyll-scholar csl-styles awesome_bot html-proofer pkg-config
.PHONY: install

serve: ## run a local server (You can specify PORT=, HOST=, and FLAGS= to set the port, host or to pass additional flags)
@@ -69,7 +69,7 @@ build: clean ## build files but do not run a server (You can specify FLAGS= to p
check-frontmatter: build ## Validate the frontmatter
$(ACTIVATE_ENV) && \
find topics/ -name tutorial.md -or -name slides.html -or -name metadata.yaml | \
xargs -n1 ruby bin/validate-frontmatter.rb
xargs -n1 ruby bin/validate-frontmatter.rb
.PHONY: check-frontmatter

check-html: build ## validate HTML
@@ -118,7 +118,7 @@ check-slides: build ## check the markdown-formatted links in slides
check-yaml: ## lint yaml files
$(ACTIVATE_ENV) && \
find . -name "*.yaml" | xargs -L 1 -I '{}' sh -c "yamllint {}" \
find topics -name '*.yml' | xargs -L 1 -I '{}' sh -c "yamllint {}"
find topics -name '*.yml' | xargs -L 1 -I '{}' sh -c "yamllint {}"
.PHONY: check-yaml

check: check-yaml check-frontmatter check-html-internal check-html check-slides check-workflows ## run all checks
@@ -54,6 +54,14 @@ figurify:
skip_titles:
- Example of an image with a caption

# Scholar
scholar:
source: topics/
bibliography: "**/*.bib"
sort_by: "year,month"
bibliography_template: bibtemplate
style: g3

# Icon tag config
icon-tag:
# in tutorials
@@ -146,3 +154,5 @@ plugins:
- jekyll-feed
- jekyll-environment-variables
- jekyll-github-metadata
- jekyll-scholar

@@ -0,0 +1,12 @@
---
---
{{reference}}
{% if entry.note %}
{{ entry.note }}.
{% endif %}
{% if entry.url %}
<a href="{{ entry.url }}">{{ entry.url }}</a>
{% endif %}
{% if entry.doi %}
<a href="https://doi.org/{{ entry.doi }}">{{ entry.doi }}</a>
{% endif %}
@@ -198,26 +198,33 @@ <h3>Overview</h3>
<div class="col-sm-10">
{{ content
| replace: '<blockquote class="hands_on">', '<blockquote class="notranslate hands_on">' }}
</div>
</div>
</div>

{% if page.key_points %}
<blockquote class="key_points">
<h3>{% icon keypoints %} Key points</h3>

<ul>
{% for key_point in page.key_points %}
<li>{{ key_point }}</li>
{% endfor %}
</ul>
</blockquote>
{% endif %}
{% if page.key_points %}
<blockquote class="key_points">
<h3>{% icon keypoints %} Key points</h3>

{% if topic.references %}
<h1 data-toc-skip>Useful literature</h1>
<p>Further information, including links to documentation and original publications, regarding the tools, analysis techniques and the interpretation of results described in this tutorial can be found <a href="{{ site.baseurl }}/topics/{{ topic.name }}#references">here</a>.</p>
{% endif %}
<ul>
{% for key_point in page.key_points %}
<li>{{ key_point }}</li>
{% endfor %}
</ul>
</blockquote>
{% endif %}

{% if topic.references %}
<h1 data-toc-skip>Useful literature</h1>
<p>Further information, including links to documentation and original publications, regarding the tools, analysis techniques and the interpretation of results described in this tutorial can be found <a href="{{ site.baseurl }}/topics/{{ topic.name }}#references">here</a>.</p>
{% endif %}

{% if material.cited %}
<h1 id="bibliography">References</h1>
{% bibliography --cited %}
{% endif %}

</div>
</div>
</div>

<h3>{% icon congratulations %} Congratulations on successfully completing this tutorial!</h3>

@@ -10,6 +10,10 @@ def to_jsonld(material, topic, site)
"name": "Galaxy Training Network",
"url": "https://galaxyproject.org/teach/gtn/"
}
if not topic then
return '{}'
end

topic_desc = {
"@type": "CreativeWork",
"name": "#{topic['title']}",
@@ -138,7 +142,7 @@ def to_jsonld(material, topic, site)
#"potentialAction":,
#"sameAs":,
#"subjectOf":,
# "url" described below
# "url" described below
}

#info depending if tutorial, hands-on or slide level
@@ -202,7 +206,7 @@ def to_jsonld(material, topic, site)
data['timeRequired'] = "PT#{material['time_estimation'].upcase}"
end
# Description with questions, objectives and keypoints

if material.key?('questions') and not material['questions'].nil? and material['questions'].length > 0 then
questions = material['questions'].join("\n - ")
description.push("The questions this #{material['type']} addresses are:\n - #{questions}\n\n")
@@ -215,7 +219,7 @@ def to_jsonld(material, topic, site)
keypoints = material['keypoints'].join("\n - ")
description.push("The keypoints are:\n - #{keypoints}\n\n")
end

# Keywords
if material.key?('tags') then
data['keywords'] = material['tags'].join(', ')
@@ -319,7 +323,7 @@ def to_jsonld(material, topic, site)
})
end
data['hasPart'] = parts

#Workflows
if material.key?('workflows') then
mentions.push(material['contributors'].map{ |x|
@@ -348,7 +352,7 @@ def to_jsonld(material, topic, site)
about.push(topic_desc)
if topic.key?('edam_ontology') then
about.push({
"@type": "DefinedTerm",
"@type": "DefinedTerm",
"@id": "http://edamontology.org/#{topic['edam_ontology']}",
"inDefinedTermSet": "http://edamontology.org",
"termCode": "#{topic['edam_ontology']}",
@@ -0,0 +1,17 @@
@article{batut2018community,
title={Community-driven data analysis training for biology},
author={Batut, B{\'e}r{\'e}nice and Hiltemann, Saskia and Bagnacani, Andrea and Baker, Dannon and Bhardwaj, Vivek and Blank, Clemens and Bretaudeau, Anthony and Brillet-Gu{\'e}guen, Loraine and {\v{C}}ech, Martin and Chilton, John and others},
journal={Cell systems},
volume={6},
number={6},
pages={752--758},
year={2018},
publisher={Elsevier},
doi={10.1016/j.cels.2018.05.012}
}

@misc{galaxy-training-materials,
url = {https://training.galaxyproject.org},
note = {Accessed 2019-04-08},
title = {Galaxy Training materials website}
}
@@ -598,5 +598,50 @@ Boxes can be nested, *e.g.* for having tips inside a hands-on:
```
{% endraw %}
# Citations
If you would like to cite any articles, books or websites in your tutorial, you can do so by adding a file called `tutorial.bib` next to your `tutorial.md` file. In this file you may enter [bibtex](http://www.bibtex.org/Using/) formatted citations. An example is given below:

{% raw %}
```
@article{batut2018community,
title={Community-driven data analysis training for biology},
author={Batut, B{\'e}r{\'e}nice and Hiltemann, Saskia and Bagnacani, Andrea and Baker, Dannon and Bhardwaj, Vivek and Blank, Clemens and Bretaudeau, Anthony and Brillet-Gu{\'e}guen, Loraine and {\v{C}}ech, Martin and Chilton, John and others},
journal={Cell systems},
volume={6},
number={6},
pages={752--758},
year={2018},
publisher={Elsevier},
doi={10.1016/j.cels.2018.05.012}
}

@misc{galaxy-training-materials,
url = {https://training.galaxyproject.org},
note = {Accessed 2019-04-08},
title = {Galaxy Training materials website}
}
```
{% endraw %}

You can use this in your tutorial as follows:

{% raw %}
```
For more information please look at this great article {% cite bebatut2018community %},
and the corresponding website {% cite galaxy-training-materials %}
```
{% endraw %}

Rendered:

For more information please look at this great article {% cite batut2018community %}, and the corresponding website {% cite galaxy-training-materials %}


A bibliography will automatically be appended to the end of your tutorial (scroll down to the end of this tutorial to see how it looks! or [jump there directly](#bibliography))

> ### {% icon tip %} Tip: Getting a bibtex citation from a doi
> If you have a DOI for a paper, you can easily obtain the bibtex citation using [doi2bib.org](https://www.doi2bib.org/).
{: .tip}
# Conclusion
{:.no_toc}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,17 @@
@Misc{microsoft-word-recognition,
url = {https://docs.microsoft.com/en-us/typography/develop/word-recognition},
note = {Accessed 2019-03-29},
year = 2017,
month = 10,
title = {The science of word recognition},
author = {Jacobs, Mike}
}

@Misc{ntrs-19930010781,
url = {https://ntrs.nasa.gov/search.jsp?R=19930010781},
note = {Accessed 2019-03-29},
year = 1999,
month = 12,
title = {On the typography of flight-deck documentation},
author = {Degani, Asaf}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.