Skip to content

Commit

Permalink
Merge branch 'main' into sujaikumar-lotus2-identifying-fungi
Browse files Browse the repository at this point in the history
  • Loading branch information
sujaikumar authored Sep 27, 2024
2 parents 0cf85de + d14fd5e commit 51c1610
Show file tree
Hide file tree
Showing 32 changed files with 468 additions and 271 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ jobs:
- name: Check Tutorial Formatting
run: |
find topics/ -name tutorial.md | xargs -n 1 python bin/check-broken-boxes.py | reviewdog -efm="%f:%l: %m" -filter-mode=file -reporter=github-pr-review
bundle exec ruby bin/lint.rb --format rdjson | reviewdog -filter-mode=file -reporter=github-pr-review -f=rdjsonl -fail-on-error
find topics/ -name tutorial.md | xargs -n 1 python bin/check-broken-boxes.py | reviewdog -efm="%f:%l: %m" -filter-mode=file -reporter=github-pr-review -fail-level=any
bundle exec ruby bin/lint.rb --format rdjson | reviewdog -filter-mode=file -reporter=github-pr-review -f=rdjsonl -fail-level=any
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ GEM
typhoeus (1.4.0)
ethon (>= 0.9.0)
unicode-display_width (2.5.0)
webrick (1.8.1)
webrick (1.8.2)
yell (2.2.2)
zeitwerk (2.6.12)

Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ icon-tag:
galaxy-toggle: fas fa-toggle-on
galaxy-upload: fas fa-upload
galaxy-download: fas fa-download
galaxy-wf-best-practices: fas fa-wand-magic-sparkles
galaxy-wf-connection: fas fa-arrows-alt-h
galaxy-wf-edit: fa fa-edit
galaxy-wf-new: fas fa-plus
Expand Down
17 changes: 9 additions & 8 deletions _layouts/event.html
Original file line number Diff line number Diff line change
Expand Up @@ -502,14 +502,15 @@ <h3>Promote the Event</h3>

// on load of the page: switch to the currently selected tab
var hash = window.location.hash;

var potential_tab = $('#myTab button[data-target="' + hash + '"]')
if (potential_tab.length != 0) {
potential_tab.tab('show');
} else {
var target_tab = '#' + $(`${hash}`).closest(".tab-pane").attr("id")
$('#myTab button[data-target="' + target_tab + '"]').tab('show');
$(hash).get(0).scrollIntoView();
if (hash){
var potential_tab = $('#myTab button[data-target="' + hash + '"]')
if (potential_tab.length != 0) {
potential_tab.tab('show');
} else {
var target_tab = '#' + $(`${hash}`).closest(".tab-pane").attr("id")
$('#myTab button[data-target="' + target_tab + '"]').tab('show');
$(hash).get(0).scrollIntoView();
}
}
});
})(window, document);
Expand Down
84 changes: 68 additions & 16 deletions _plugins/jekyll-jsonld.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require 'json'
require './_plugins/gtn'
require './_plugins/gtn/git'
require './_plugins/util'

module Jekyll
# Generate JSON-LD metadata for the GTN.
Expand Down Expand Up @@ -794,12 +795,35 @@ def generate_material_jsonld(material, topic, site)

data['isPartOf'] = topic_desc

data['abstract'] = material
.fetch('content', '')
.strip
.split("\n")
.first

if ! data['abstract'].nil?
data['abstract'] = data['abstract']
.gsub(/\{\{\s*site.baseurl\s*\}\}/, url_prefix(site))
.gsub(/\[{{\s*site.url\s*}}/, '[' + url_prefix(site))
.gsub(/{% link (topics[^%]*).md %}/, url_prefix(site) + '\1.html')
.gsub(/{% link (topics[^%]*).html %}/, url_prefix(site) + '\1.html')
.gsub(/\s*\(?{%\s*cite [^}]+\s*%}\)?/, '')
.gsub('{{ site.github_repository }}', safe_site_config(site, 'github_repository', 'https://example.com'))
.gsub(/{% snippet ([^%]*) %}/, '')
.gsub(/{% include ([^%]*) %}/, '')
end

description.push("## Abstract\n\n#{data['abstract']}\n\n")

if (material['name'] == 'tutorial.md') || (material['name'] == 'slides.html')
data['learningResourceType'] = if material['name'] == 'tutorial.md'
'hands-on tutorial'
else
'slides'
end

if material['name'] == 'tutorial.md'
data['learningResourceType'] = 'e-learning'
description.push("## About This Material\n\nThis is a Hands-on Tutorial from the GTN which is usable either for individual self-study, or as a teaching material in a classroom.\n\n")
else
data['learningResourceType'] = 'slides'
end

data['name'] = material['title']
data['url'] = "#{site['url']}#{site['baseurl']}#{material['url']}"

Expand All @@ -817,8 +841,8 @@ def generate_material_jsonld(material, topic, site)
description.push("## Questions this #{material['type']} will address\n\n - #{questions}\n\n")
end
if material.key?('objectives') && !material['objectives'].nil? && material['objectives'].length.positive?
objectives = material['objectives'].join("\n - ")
description.push("## Learning Objectives\n\n - #{objectives}\n\n")
objectives = material['objectives'].map{|x| "- #{x}"}.join("\n")
description.push("## Learning Objectives\n\n#{objectives}\n\n")
data['teaches'] = objectives
end
if material.key?('keypoints') && !material['keypoints'].nil? && material['keypoints'].length.positive?
Expand All @@ -844,12 +868,41 @@ def generate_material_jsonld(material, topic, site)
name: "Associated Workflows"
})
end
if actual_material.key?('zenodo_link')
mentions.push({
'@type': 'Thing',
url: (actual_material['zenodo_link']).to_s,
name: "Associated Training Datasets"
})

# Notebooks
if actual_material.key?('notebook')
if actual_material['notebook']['language'] != 'r'
# Python, Bash, SQL (all via jupyter)
url = "#{site['url']}#{site['baseurl']}#{material['dir']}#{material['topic_name']}-#{material['tutorial_name']}.ipynb"
mentions.push({
'@type': 'Thing',
url: url,
name: "Jupyter Notebook (with Solutions)"
})
mentions.push({
'@type': 'Thing',
url: url.gsub(/\.ipynb$/, '-course.ipynb'),
name: "Jupyter Notebook (without Solutions)"
})
elsif actual_material['notebook']['language'] == 'r' # Actual R
url = "#{site['url']}#{site['baseurl']}#{material['dir']}#{material['topic_name']}-#{material['tutorial_name']}.Rmd"
mentions.push({
'@type': 'Thing',
url: url,
name: "Quarto/RMarkdown Notebook"
})
end
end

# Zenodo link out
if actual_material.key?('zenodo_link') && ! actual_material['zenodo_link'].nil?
if actual_material['zenodo_link'].length.positive?
mentions.push({
'@type': 'Thing',
url: (actual_material['zenodo_link']).to_s,
name: "Associated Training Datasets"
})
end
end

if description.empty?
Expand Down Expand Up @@ -905,7 +958,7 @@ def generate_material_jsonld(material, topic, site)
'@context': 'http://schema.org',
'@type': 'LearningResource',
url: (page['hands_on_url']).to_s,
learningResourceType: 'hands-on tutorial',
learningResourceType: 'e-learning',
interactivityType: 'expositive',
}
)
Expand All @@ -921,7 +974,7 @@ def generate_material_jsonld(material, topic, site)
"/#{tuto}/tutorial.html",
name: (page['title']).to_s,
description: "Hands-on for '#{page['title']}' tutorial",
learningResourceType: 'hands-on tutorial',
learningResourceType: 'e-learning',
interactivityType: 'expositive',
provider: GTN
}
Expand Down Expand Up @@ -991,7 +1044,6 @@ def generate_material_jsonld(material, topic, site)

data['educationalLevel'] = material.key?('level') ? eduLevel[material['level']] : 'Beginner'
data['mentions'] = mentions
data['abstract'] = material.fetch('content', '').strip.split("\n").first

data
end
Expand Down
23 changes: 23 additions & 0 deletions _plugins/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,26 @@ def collapse_event_date_pretty(event)
"#{s.strftime('%B')} #{s.day}, #{s.year}#{dash}#{e.strftime('%B')} #{e.day}, #{e.year}"
end
end

def safe_site_config(site, key, default)
if !site.config.nil? && site.config.key?(key)
site.config[key]
else
default
end
end


def url_prefix(site)
if !site.config.nil? && site.config.key?('url')
"#{site.config['url']}#{site.config['baseurl']}"
else
'http://localhost:4000/training-material/'
end
end

def markdownify(site, text)
site.find_converter_instance(
Jekyll::Converters::Markdown
).convert(text.to_s)
end
12 changes: 9 additions & 3 deletions faqs/galaxy/workflows_best_practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@ title: Ensuring Workflows meet Best Practices
area: workflows
box_type: tip
layout: faq
contributors: [hexylena]
contributors: [hexylena, elichad]
---

When you are editing a workflow, there are a number of additional steps you can take to ensure that it is a Best Practice workflow and will be more reusable.

1. Open a workflow for editing
1. In the workflow menu bar, you'll find the {% icon galaxy-wf-options %} Workflow Options dropdown menu.
1. Click on it and select "Best Practices" from the dropdown menu.
1. In the workflow menu bar, you'll find the {% icon galaxy-wf-options %} **Workflow Options** dropdown menu.
1. Click on it and select {% icon galaxy-wf-best-practices %} **Best Practices** from the dropdown menu.

![screenshot showing the best practices menu item in the gear dropdown.]({% link faqs/galaxy/images/best-practices1.png %})

1. This will take you to a new side panel, which allows you to investigate and correct any issues with your workflow.

![screenshot showing the best practices side panel. several issues are raised like a missing annotation with a link to add that, and non-optional inputs that are unconnected. Additionally several items already have green checks like the workflow defining creator information and a license.]({% link faqs/galaxy/images/best-practices2.png %})

The Galaxy community also has a [guide on best practices for maintaining workflows](https://planemo.readthedocs.io/en/latest/best_practices_workflows.html). This guide includes the best practices from the Galaxy workflow panel, plus:

* adding tests to the workflow
* publishing the workflow on GitHub, a public GitLab server, or another public version-controlled repository
* registering the workflow with a workflow registry such as WorkflowHub or Dockstore
18 changes: 15 additions & 3 deletions topics/assembly/tutorials/assembly-decontamination/tutorial.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
layout: tutorial_hands_on

title: Decontamination of a genome assembly
zenodo_link: https://zenodo.org/records/13367433
questions:
Expand All @@ -11,14 +10,27 @@ objectives:
- Remove Mitochondrial DNA from an assembly
time_estimation: 1H30M
key_points:
- Assembly decontamination is important to avoid false identification of genes, blast hits...
- Assembly decontamination is important to avoid false identification of genes, blast
hits...
contributions:
authorship:
- delphine-l
- delphine-l
recordings:
- youtube_id: -5oxfNnNwoA
length: 29M
galaxy_version: 24.1.2.dev0
date: '2024-09-20'
speakers:
- delphine-l
captioners:
- delphine-l
bot-timestamp: 1726801100


---



When sequencing a genome, it is common that contamination from a foreign organism get mixed with the genomic material of our species of interest. For instance, if you are processing a whole body sample of an insect then you will sequence not only the insect, but everything on and inside of it. When building a reference genome, it is important to separate these contaminants from the genome of our species. Foreign DNA sequences could cause false positive identification when running BLAST analyses, the misidentification of genes that don't actually belong to the species, or they can be incorporated as 'reference' sequence for that species in the public archives when those sequences did not actually belong to that species.


Expand Down
18 changes: 15 additions & 3 deletions topics/assembly/tutorials/mitochondrion-assembly/tutorial.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
---
layout: tutorial_hands_on

title: Assembly of the mitochondrial genome from PacBio HiFi reads
zenodo_link: 'https://zenodo.org/records/13345315'
zenodo_link: https://zenodo.org/records/13345315
questions:
- How to assemble the mitochondrial genome from PacBio Hifi Reads
objectives:
- Generate Mitochondrial assembly
- Understand the outputs of MitoHifi
time_estimation: 1H
key_points:
- MitoHifi generates the assembly and annotation of the Mitochondrial Genome using a reference sequence.
- MitoHifi generates the assembly and annotation of the Mitochondrial Genome using
a reference sequence.
contributors:
- delphine-l
recordings:
- youtube_id: 0ehAZ0DZsFU
length: 11M
galaxy_version: " 24.1.2.dev0"
date: '2024-09-20'
speakers:
- delphine-l
captioners:
- delphine-l
bot-timestamp: 1726861719


---



# Introduction

This tutorial will show you how to assemble a mitochondrial genome from PacBio HiFi data using MitoHiFi {% cite uliano2023 %}.
Expand Down
Loading

0 comments on commit 51c1610

Please sign in to comment.