forked from StreetScienceCommunity/DNAnalyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into story1_divide-by-levels
- Loading branch information
Showing
72 changed files
with
2,338 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,7 @@ _site | |
.DS_Store | ||
*.swp | ||
.sass-cache | ||
__pycache__ | ||
__pycache__ | ||
node_modules | ||
videos | ||
.jekyll-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
### Script adapted from Galaxy Training Network script | ||
### https://github.com/galaxyproject/training-material/ | ||
|
||
#!/usr/bin/env ruby | ||
require 'yaml' | ||
require 'shellwords' | ||
require 'json' | ||
|
||
fn = ARGV[0] | ||
metadata = YAML.load_file(fn) | ||
|
||
ARI_MAP = File.expand_path(File.join(__dir__, 'ari-map.yml')) | ||
WORD_MAP = {} | ||
YAML.load_file(ARI_MAP).each_pair do |k,v| | ||
WORD_MAP.merge!({k.downcase => v}) | ||
end | ||
|
||
APPROVED_VOICES = { | ||
"en" => [ | ||
{"id" =>"Amy" , "lang" => "en-GB" , "neural" => true}, | ||
{"id" =>"Aria" , "lang" => "en-NZ" , "neural" => true}, | ||
{"id" =>"Brian" , "lang" => "en-GB" , "neural" => true}, | ||
{"id" =>"Emma" , "lang" => "en-GB" , "neural" => true}, | ||
{"id" =>"Joanna" , "lang" => "en-US" , "neural" => true}, | ||
{"id" =>"Joey" , "lang" => "en-US" , "neural" => true}, | ||
{"id" =>"Kendra" , "lang" => "en-US" , "neural" => true}, | ||
{"id" =>"Matthew" , "lang" => "en-US" , "neural" => true}, | ||
{"id" =>"Nicole" , "lang" => "en-AU" , "neural" => false}, | ||
{"id" =>"Olivia" , "lang" => "en-AU" , "neural" => true}, | ||
{"id" =>"Raveena" , "lang" => "en-IN" , "neural" => false}, | ||
{"id" =>"Salli" , "lang" => "en-US" , "neural" => true} | ||
], | ||
"es" => [ | ||
{ "id" => "Miguel" , "lang" => "es-US" , "neural" => false }, | ||
{ "id" => "Mia" , "lang" => "es-MX" , "neural" => false }, | ||
{ "id" => "Enrique" , "lang" => "es-ES" , "neural" => false }, | ||
{ "id" => "Conchita" , "lang" => "es-ES" , "neural" => false }, | ||
{ "id" => "Lupe" , "lang" => "es-US" , "neural" => true } | ||
] | ||
} | ||
|
||
m_lang = metadata.fetch('lang', 'en') | ||
m_voice = metadata.fetch('voice', nil) | ||
|
||
# Parse the material for the slide notes | ||
file = File.open(fn) | ||
lines = file.readlines.map(&:chomp) | ||
|
||
# The structure will be | ||
# --- | ||
# meta | ||
# --- | ||
# | ||
# contents | ||
|
||
# +1 because we skipped the 0th entry, +1 again to not include the `---` | ||
end_meta = lines[1..-1].index("---") + 2 | ||
|
||
# Strip off the metadata | ||
contents = lines[end_meta..-1] | ||
|
||
# This will be our final script | ||
blocks = [[metadata['title']]] | ||
|
||
|
||
# Accumulate portions between ??? and --- | ||
current_block = [] | ||
in_notes = false | ||
contents.each{ |x| | ||
# Check whether we're in the notes or out of them. | ||
if x == "???" then | ||
in_notes = true | ||
elsif x == "---" or x == "--" then | ||
if in_notes then | ||
blocks.push(current_block) | ||
current_block = [] | ||
end | ||
|
||
in_notes = false | ||
end | ||
|
||
if in_notes then | ||
current_block.push(x) | ||
end | ||
} | ||
blocks.push(current_block) | ||
|
||
if m_lang == "en" then | ||
blocks.push(["Thank you for watching!"]) | ||
elsif m_lang == "es" then | ||
blocks.push(["¡Gracias por ver este vídeo!"]) | ||
else | ||
blocks.push(["Thank you for watching!"]) | ||
end | ||
|
||
# For each block, cleanup first. | ||
blocks = blocks.map{ |block| | ||
# Remove the - prefix from each line | ||
script_lines = block.map{ |x| x.strip.delete_prefix("- ") } | ||
# Remove the leading ??? | ||
if script_lines[0] == '???' | ||
script_lines = script_lines[1..-1] | ||
end | ||
# Remove blank entries | ||
script_lines = script_lines.select{ |x| x.length != 0 } | ||
script_lines = script_lines.map{ |line| | ||
line.delete_prefix("- ") | ||
line.gsub!(/`/, '"') | ||
# If they don't end with punctuation, fix it. | ||
if ! (line.end_with?('.') or line.end_with?('?') or line.end_with?('!')) | ||
line += '.' | ||
end | ||
|
||
line | ||
} | ||
script_lines | ||
} | ||
|
||
#out_subs.write(blocks.map{ |line| line.join(" ") }.join("\n")) | ||
res = Hash.new | ||
res["blocks"] = blocks | ||
|
||
if m_voice.nil? then | ||
if m_lang == "en" then | ||
res["voice"] = APPROVED_VOICES['en'].sample | ||
elsif m_lang == "es" then | ||
res["voice"] = APPROVED_VOICES['es'].sample | ||
else | ||
res["voice"] = APPROVED_VOICES['en'].sample | ||
end | ||
else | ||
res["voice"] = metadata['voice'] | ||
end | ||
|
||
print JSON.pretty_generate(res) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
### Script adapted from Galaxy Training Network script | ||
### https://github.com/galaxyproject/training-material/ | ||
|
||
set -e | ||
|
||
function cleanup(){ | ||
kill $(pgrep -f $(npm bin)/http-server) || true | ||
} | ||
|
||
trap cleanup EXIT | ||
|
||
slides=$1 | ||
echo "====== $slides ======" | ||
dir="$(dirname "$slides")" | ||
pdf="$dir/$(basename "$slides" .html).pdf" | ||
mp4="videos/$dir/$(basename "$slides" .html).mp4" | ||
built_slides="_site/$slides" | ||
|
||
# Launch small server | ||
$(npm bin)/http-server -p 9876 _site & | ||
|
||
# Process the slides | ||
echo $built_slides | ||
$(npm bin)/decktape automatic -s 1920x1080 http://localhost:9876/DNAnalyzer/$slides _site/DNAnalyzer/$pdf; \ | ||
|
||
# Build the slides | ||
echo ari.sh "_site/DNAnalyzer/$pdf" "$slides" "$mp4" | ||
./bin/ari.sh "_site/DNAnalyzer/$pdf" "$slides" "$mp4" | ||
|
||
cleanup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
# These aren't needed, they're said correctly. Acronyms work fine. | ||
#CMVFS: C V M F S | ||
#IDC: I D C | ||
# However if the usage is ever lowercase, it'll attempt to pronounce it directly | ||
bwa: BWA | ||
# And for some you'll need to separate the letter part vs pronounced part | ||
BWA-MEM: BWA mem | ||
'usegalaxy.*': usegalaxy dot star | ||
gxadmin: GX admin | ||
nginx: engine X | ||
systemd: system D | ||
/etc: / E T C | ||
systemctl: system C T L | ||
cgroup: C group | ||
cgroups: C groups | ||
telegraf: telegraph | ||
sqlite: SQL light | ||
SQLAlchemy: SQL alchemy | ||
fastqc: fast QC | ||
ntpdate: NTP date | ||
RedHat: Red Hat | ||
ATAC-Seq: ATAC Seq | ||
Tn5: T N five | ||
paired-end: paired end | ||
# For some reason moz-tts doesn't pronounce right in a sentence unless it's | ||
# lowercase. This gives parity with AWS | ||
RAM: ram | ||
uWSGI: "you whiskey" | ||
GIL: gill | ||
DRMAA: drama | ||
hisat2: high sat 2 | ||
Node.js: node JS | ||
db-skip-locked: DB skip locked | ||
REST: rest | ||
FASTQ: fast Q | ||
scRNA-seq: S C RNA seq | ||
scRNA: S C RNA | ||
RNAmmer: RNA mer | ||
Rfam: R fam | ||
Pfam: P fam | ||
m/z: MZ | ||
'>': greater than sign | ||
b-ions: B ions | ||
y-ions: Y ions | ||
MSstats: MS stats | ||
LC-MS/MS: LC MS MS | ||
topN: top N | ||
miRNA: micro RNA | ||
miRNAs: micro RNAs | ||
mRNA: m RNA | ||
mRNAs: m RNAs | ||
FastQC: fast QC | ||
MultiQC: multi QC | ||
DESeq2: D E Seq 2 | ||
TargetFinder: target finder | ||
MiRDeep2: mir deep 2 | ||
cutadapt: cut adapt | ||
b': b prime | ||
e': e prime | ||
/: forward slash |
Oops, something went wrong.