diff --git a/data/intro/flip_animating.png b/data/intro/flip_animating.png
new file mode 100644
index 0000000..3953824
Binary files /dev/null and b/data/intro/flip_animating.png differ
diff --git a/data/intro/flip_apollo.png b/data/intro/flip_apollo.png
new file mode 100644
index 0000000..046e37d
Binary files /dev/null and b/data/intro/flip_apollo.png differ
diff --git a/data/intro/flip_circos.png b/data/intro/flip_circos.png
new file mode 100644
index 0000000..24d7166
Binary files /dev/null and b/data/intro/flip_circos.png differ
diff --git a/data/intro/flip_static.png b/data/intro/flip_static.png
new file mode 100644
index 0000000..fb30ba1
Binary files /dev/null and b/data/intro/flip_static.png differ
diff --git a/data/intro/genome_animated.png b/data/intro/genome_animated.png
new file mode 100644
index 0000000..2c4679e
Binary files /dev/null and b/data/intro/genome_animated.png differ
diff --git a/data/intro/genome_apollo.png b/data/intro/genome_apollo.png
new file mode 100644
index 0000000..f0ae590
Binary files /dev/null and b/data/intro/genome_apollo.png differ
diff --git a/data/intro/genome_circos.png b/data/intro/genome_circos.png
new file mode 100644
index 0000000..0032136
Binary files /dev/null and b/data/intro/genome_circos.png differ
diff --git a/data/intro/genome_static2.png b/data/intro/genome_static2.png
new file mode 100644
index 0000000..90308da
Binary files /dev/null and b/data/intro/genome_static2.png differ
diff --git a/data/intro/intro.png b/data/intro/intro.png
new file mode 100644
index 0000000..971ae6f
Binary files /dev/null and b/data/intro/intro.png differ
diff --git a/data/intro/intro2.png b/data/intro/intro2.png
new file mode 100644
index 0000000..42dee7e
Binary files /dev/null and b/data/intro/intro2.png differ
diff --git a/data/intro/phylo.png b/data/intro/phylo.png
new file mode 100644
index 0000000..8f3eb91
Binary files /dev/null and b/data/intro/phylo.png differ
diff --git a/genome.html b/genome.html
index 0ab3351..1094d8b 100644
--- a/genome.html
+++ b/genome.html
@@ -13,8 +13,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
Click Icons to Select Species.
+
Click on two different animals from the phylogenetic tree to select,
+ and then go to the chromosome view to see the genome evolution and
+ divergence of the two species, based on common ancestors!
Click on two different animals from the phylogenetic tree to select,
+ and then go to the chromosome view to see the genome evolution and
+ divergence of the two species, based on common ancestors!
"
+ + "Chromosomes are composed of DNA, and the set of chromosomes for a species is called its genome.
"
+ + "Animal genomes mutate and evolve into new species over time."
+ + " These new species share preserved DNA segments with their ancestor, called synteny blocks. "
+ + "It's like a puzzle where the DNA blocks are the pieces, and they've been put together in a new way! ...";
+ addBodyText(body_text, "../data/intro/intro.png", 7, 5);
+ addButtons(1,0);
+
+ } else if (pageNum == 1) {
+ console.log("page 1")
+ title_text = "Synteny Blocks Come From Common Ancestors";
+ addTitleText(title_text);
+ body_text = "Today's species such as dolphins and cats also share synteny blocks between each other."
+ + "
"
+ + "By studying the genomes of two existing species, scientists can figure out when they diverged from each other! "
+ + "This diverging animal, which existed many millions of years ago, is called a Common Ancestor, "
+ + "and contains DNA that is shared by both current, diverged species."
+ + "
"
+ + "Use this application to learn how synteny blocks evolve from Common Ancestors to current species...";
+ addBodyText(body_text, "../data/intro/intro2.png", 5, 7);
+ addButtons(1,1);
+
+ } else if (pageNum == 2) {
+ title_text = "The Phylogenetic Tree Classifies Species";
+ addTitleText(title_text);
+ body_text = "
Use the mini tree in the left sidebar to get an overview. "
+ + "Drag the white frame to take a closer look at different part of the tree. "
+ + "Zoom in and out by scrolling the mouse. "
+ + "
Click on the animal icons in the tree to "
+ + " learn more about them. When two species are in the right sidebar, "
+ + "the path to their most recent common ancestor is highlighted. "
+ + "Then click on \"go to genome view\" to explore their chromosome evolution.";
+ addBodyText(body_text, "../data/intro/phylo.png", 7, 5);
+ addButtons(1,1);
+
+ } else if (pageNum == 3) {
+ title_text = "Use The Genome View To Evolve Chromosomes";
+ addTitleText(title_text);
+ body_text = "The genome view is for showing indivdiual genome evolution."
+ + "
"
+ + "The chromosomes for each species are shown as a set of colored bars. "
+ + "Clicking on a chromosome will show how the chromosome evolved from the Common Ancestor to today's species. "
+ + "Chromosomes split, flip, or move to other chromosomes! "
+ + "
Click the arrow connecting two species to evolve the entire genome at once!
"
+ + "To go back to the full tree, hover on \"Synteny Explorer\" at the top left and click.";
+ addBodyText(body_text, "../data/intro/genome_animated.png", 6, 6);
+ addButtons(1,1);
+
+ } else if (pageNum == 4) {
+ title_text = "Synteny Blocks Sometimes Flip Out!";
+ addTitleText(title_text);
+ body_text = "Synteny blocks sometimes invert. This type of rearrangement is a disrupting event, "
+ + "and is an important mechanism for scientists in studying genome evolution. "
+ + "
To denote a flip, a synteny block will do a half spin."
+ + "
Use \"Mode\" in the navigation bar to select different representations of the genome evolution.";
+ addBodyText(body_text, "../data/intro/flip_animating.png", 6, 6);
+ addButtons(1,1);
+
+ } else if (pageNum == 5) {
+ title_text = "Explore and Learn!";
+ addTitleText(title_text);
+ body_text = "Have fun playing!
"
+ + "Use the Help icon if you're not sure what to do. "
+ + "
"
+ // + "Quiz yourself by clicking the Test You Knowledge icon."
+ // + "\n\n"
+ // + "When you're done playing, please click the I'm Finished button to end your "+
+ // "session, grab the paper slip for the user study note.\n\n" +
+ + "Thanks from the team! "
+ + "Chris, Greg, Kathy, Dr Kwan-Liu Ma, and Dr Harris Lewin";
+ addBodyText(body_text, 0, 9, 3);
+ addButtons(1,1);
+
+ } else if (pageNum == 6) {
+ title_text = "Thanks for playing!";
+ addTitleText(title_text);
+
+ body_text = "If you're interested in learning more about genomic evolution, " +
+ "consider looking at some of the following resources:
" +
+ "\u2022 Wikipedia pages for 'genome evolution', 'comparative genomics', or 'synteny' " +
+ "\u2022 Online genome databases like Genome Browser (https://genome.ucsc.edu) " +
+ "\u2022 Check out a book on genomics at local library " +
+ "\u2022 Explore a natural history museum " +
+ "\u2022 Talk to your biology teacher at school" + "
"
+ + "Don't forget to let us know what you think of the app. It really helps out our student research and this project's development!";
+ addBodyText(body_text, 0, 9, 3);
+ addButtons(0,1);
+
+ }
+
+ function addTitleText(text) {
+
+ $(window).resize(function() {
+ width = $(window).width();
+ height = $(window).height();
+ text_ratio = Math.min(width/original_width, height/original_height)
+ //console.log("new text ratio: ", text_ratio)
+ title_font_size = text_ratio * 3;
+ body_font_size = text_ratio * 1.5;
+
+ var textSize = title_font_size+"rem"
+ console.log(textSize)
+ $('.title-text-box').css("font-size", title_font_size + "rem");
+ $('.title-text-box').html("
");
d3.selectAll('#miniTree svg').remove();
// become 10 after selection, close button: go to 00
d3.select("#speOne")
.select(".closeButton")
.on("click", function(){
- $("#speOne").html("
Click Icons to Select Species.
");
+ $("#speOne").html("
Click on two different animals from the phylogenetic tree"
+ + " to select, and then go to the chromosome view to see the genome evolution and "
+ + "divergence of the two species, based on common ancestors!
Click on two different animals from the phylogenetic tree"
+ + " to select, and then go to the chromosome view to see the genome evolution and "
+ + "divergence of the two species, based on common ancestors!
");
$(".button").hide()
d3.selectAll('#miniTree svg').remove();
d3.selectAll(".boarder").attr("opacity",0);
@@ -235,9 +273,9 @@ function creatLinearTree(life, info, baseSvg) {
selected = 3; // go to state 11
secondNodeName = "" + d.data.name;
$("#speTwo").html("
Click on two different animals from the phylogenetic tree"
+ + " to select, and then go to the chromosome view to see the genome evolution and "
+ + "divergence of the two species, based on common ancestors!
");
d3.selectAll('#miniTree svg').remove();
// become 10 after selection, close button: go to 00
d3.select("#speOne")
.select(".closeButton")
.on("click", function(){
- $("#speOne").html("
Click Icons to Select Species.
");
+ $("#speOne").html("
Click Icons to Select Species.
");
$(".button").hide()
d3.selectAll('#miniTree svg').remove();
d3.selectAll(".boarder").attr("opacity",0);
@@ -430,7 +470,7 @@ function creatLinearTree(life, info, baseSvg) {
}
})
} else if (thirdNodeName == firstNodeName) { // when deselect the first node
- $("#speOne").html("
Click Icons to Select Species.
");
+ $("#speOne").html("
Click Icons to Select Species
");
$(".button").hide()
d3.selectAll('#miniTree svg').remove();
d3.selectAll(".boarder").attr("opacity",0);
@@ -450,7 +490,7 @@ function creatLinearTree(life, info, baseSvg) {
}
}
} else if (thirdNodeName == secondNodeName) { // when deselect the second node
- $("#speTwo").html("
Click on two different animals from the phylogenetic tree to select,
+ and then go to the chromosome view to see the genome evolution and
+ divergence of the two species, based on common ancestors!