Giter Club home page Giter Club logo

cytoscape-tutorials's Introduction

Main Page

Visit tutorials.cytoscape.org for a curated set of user tutorials.

How to Make and Present Cytoscape Tutorials

This repo contains a collection of training modules for Cytoscape that can be used to compose workshop presentations. The repo also includes a clone of the reveal.js code that enables the presentation mode for these modules and workshops.

Presentations, Protocols and Modules

Check out the current list of training materials.

Building upon the powerful framework of reveal.js, we have developed a few custom features and styles tailored for use in Cytoscape training materials. In addition to the contents below, you can learn more about using reveal.js in general from the reveal-readme.

Table of Contents

Presenting

Browse the available training materials already prepared:

  • presentations -- Specific programs compiled for target audiences; designed for projector presentation to a group; typically composed of custom slides together with general modules (see below).
  • modules -- Concise material focused on specific tasks; intended to be reused in multiple presentations (see above).
  • protocols -- General tutorials targeting common workflows or protocols; designed for display on individual monitors and interactivity via CyBrowser; typically linked to individually or in a presentation.

Navigating

Use arrow keys, "space" or the on-screen arrows (lower right) to navigate the slides. Take note of modules that are organized vertically within a presentation.

Overview

Online

You can access training materials at any time via a web browser. All content is tested in the latest versions of Firefox and Chrome. Simply navigate to the corresponding url, e.g.,

https://cytoscape.org/cytoscape-tutorials/protocols/basic-data-visualization/index.html

Offline

You can also generate a PDF version of any presentation or protocol and save it as a local file to share or present offline. Note that animated slides do not display as separate slides in PDF form, but rather as single slides in their final form. However, protocols should be composed in such a way to display properly in PDF. Simply append ?print-pdf to the end of the url for any protocol, e.g.,

https://cytoscape.org/cytoscape-tutorials/protocols/basic-data-visualization/?print-pdf

Then choose File>Print... and set the orientation to landscape and Save to PDF. Verify that the page breaks are correct throughout the presentation. For longer presentations, you may need to generate the PDF using an alternative approach, see Decktape. Example usage:

npm install -g decktape
decktape automatic https://cytoscape.org/cytoscape-tutorials/presentations/advanced-automation.html#/ advanced-automation.pdf

Sharing

Please feel free to use, share, copy or adapt any of the training materials you find here. They are all implicitly published under the CC0 waiver for maximum reuse potential.

Building

In order to adapt or compose your own tutorial, and you do not already have edit permissions for this repo, you can simply fork the repo. If your content is of general use, please submit a pull request and we'll be happy to accept it.

If you have a suggestion to make regarding the content and don't have the time or inclination to do the coding, please submit your request in the issue tracker.

If you are going to edit a tutorial and are not already familiar with Reveal.js, you will want to start with the reveal.js docs to learn how to setup your development environment and the basics of building content. Once you are familiar with reveal, you will want to review the common elements and custom styles available in our repo for Cytoscape tutorials (see Style below). Also refer to our templates with example slides and style usage.

In order to preview your local changes, you can simply open the HTML files in your browser, e.g., using the open command line function. Alternatively, for a live preview that updates in real-time, you can run npm start from the top directory. For npm functionality, you will need to install node.js (https://nodejs.org) and run npm install the first time (see full setup).

Organization

The first thing to notice about our repo is the organization. From the top level, you will find presentations and protocols. These leverage different CSS styles and different sets of modules.

|--presentations/
|  |--advanced-automation.html
|  |--(other presentations)
|  |--modules/
|     |--intro-cytoscape/
|     |--(other presentation modules)
|--protocols/
|  |--loading-networks/
|  |--(other protocols)

Each level can contain image assets that are relevant at that level. For example, images that are needed referenced by the html a directory should be kept in that directory. Images that are actively being used across many tutorials are kept in the top level's assets/images.

Each level will have named html files or index.html files, which are the files that one presents and shares. Modules directories will also have module.html files which contain the slide content that is referenced and pulled into the presentable html files. For example, the index.html file for the intro-cytoscape module includes reveal headers, scripts and this line of code to pull in the slide content:

<section data-external="modules/intro-cytoscape/module.html"></section>

Strategies

  1. Composing a presentation from existing modules
    Say you are putting together a presentation for class or workshop, but the existing presentations here aren't exactly right. You want a bit of customization, but you don't want to start over from scratch. Well, with this strategy you can reuse any of the modules here and pull them together in any order you like, while also adding custom slides before, after or between modules (though not within a given module).

    See the presentation template and code to see how simple it is to reference existing modules, like so <section data-external="modules/template-a/module.html"></section>.

    You can insert as many modules as you'd like and in any order. Furthermore, you can add slides using the section tag before or after modules in order to customize, e.g., with a title slide. This strategy works for protocols in the same way.

  2. Composing a presentation module Say you want to present a topic in detail, but it is not covered by any of the existing modules here. Well, you can make your own modules that can then be used (and reused) in multiple compositions (see Strategy 1). If possible, try to make the module focused on a single topic. Make more than one module, if necessary. And try to make the slides generic enough so that the module can be reused by other presenters, e.g., avoid content that is particular to only one audience, venue or setting.

    See a presentation module template and code to see how to build a module and how sample slides are formatted. Note how the moduled.html file is simply a set of <section> tags; while the index.html is generic wrapper you can copy/paste to make your sections work as a reveal.js presentation. The Style section below will cover most of the aspects of reveal you'll need to know to build a set of slides.

  3. Composing a protocol In contrast to presentations, protocols are easier to prepare. Since protocols work best as brief, self-guided lessons, they are organized as a single level of subdirectories; one for each protocol. Simply copy one of the existing protocol template directories and rename it. Then you can replace the template sections with your slide content.

Style

We have developed custom themes for Cytoscape tutorials. These stylesheets provide settings and features tailored for our content, making it easier to put together (and reuse) training materials in this repo. Review how to use these customizations below.

Version

To help develop training material that is accurate and current, we developed a custom footer and variable to specify the version of Cytoscape that the content pertains to. You can update the version tag in the title slide of your presentation/protocol files within the footer div:

<version>3.5.1</version>

Version

Headings

We have customized heading tags for the Cytoscape tutorial styles:

Headers

example slide

Slide Links

There are many ways to link to slides within your presentation. Here are a few of the most useful ones...

<a href="#/2/3">Link to slide by position (e.g., second slide over, third slide down)</a>
<a href="#/my-fav-slide">Link slide by name (e.g., section id="my-fav-slide")</a>
<a href="#" class="navigate-next">Link to next slide</a>

example slide

Ribbons

These are ideal for making interactive Agenda or Outline slides. They have a similar style as h1 headers, but are designed to work together with slide links (or external links) and have the nifty behavior of automatically stacking and coloring themselves when you list more than one.

<a href="#/"><ribbon>Title Slide</ribbon></a>
<a href="#/3"><ribbon>Template Module A</ribbon></a>
<a href="#/headers"><ribbon>List of Headers</ribbon></a>
<a href="#" class="navigate-next"><ribbon>How Links Work</ribbon></a>
<a class="inactive"><ribbon>Inactive Ribbon Style</ribbon></a>

Pro tip: if you indicate class="inactive" then you can gray-out a ribbon and disable its link. This is useful for mid-presentation review of the agenda, i.e., to remind the audience know what's been covered already and where you are at in the presentation.

example slide

Highlight

Use the <highlight> tag to highlight text with the Cytoscape-orange color.

example slide

Code

Reveal uses highlightjs to format code snippets. Use tags around code:

<pre><code data-trim>
if (files != null) {
   for (int i=0; i < files.length; i++) {
       String filename = files[i];
   }
}
</pre><c/ode data-trim>

example slide

Lists

Typical usage of <ul> for unordered lists and <ol> for ordered lists is supported with <li> tagging each list item.

Images

Images are automatically scaled, centered and given a drop shadow border. Common customizations can be made with style settings, such as width...

<img style="width:60%;" src="modules/intro-network-biology/network-example.jpg">

You can also float the image to the left (or right) side by appending "float:left" to the style.

Pro tip: If you have local copies of the images you want to include, upload them into the same directory as the html file, but include the path in src relative to the presentation (or protocol) directory, like in the example above. The index.html wrapper includes a base href="../.." so that the paths will work for both modules and presentations. If these images are likely to be used by multiple modules or presentations, you can also upload them to the top level assets/images dir, in which case the relative path in src should be "../assets/images".

Citations

Use the <small> tag to format citations at the bottom of slides.

example slide

Animation

The fragment class can be added to any html elements (e.g., paragraphs, images, list items) to set them up for animation, i.e., step-wise display. If you want to animate more than one element at the same time, simply wrap them in a div and add class="fragment" to it. You can also specify the type of animation per fragment...

<p class="fragment grow">grow</p>
<p class="fragment shrink">shrink</p>
<p class="fragment fade-out">fade-out</p>
<p class="fragment fade-up">fade-up (also down, left and right!)</p>
<p class="fragment current-visible">visible only once</p>
<p class="fragment highlight-current-blue">blue only once</p>
<p class="fragment highlight-red">highlight-red</p>
<p class="fragment highlight-green">highlight-green</p>
<p class="fragment highlight-blue">highlight-blue</p>

If you want an element to fade-out after fading-in, you can combine fragments like so...

<span class="fragment fade-in">
		<span class="fragment fade-out">I'll fade in, then out</span>
</span>

And for more precise control over the order and combination of animated fragments, you can explicitly specify an index number...

<p class="fragment" data-fragment-index="3">Appears last</p>
<p class="fragment" data-fragment-index="1">Appears first</p>
<p class="fragment" data-fragment-index="2">Appears second</p>

example slide

Columns

The Cytoscape stylesheet includes a custom column class which can be applied to two consecutive divs to automatically get a two-column layout for your slide content.

<div class="column">
	...contents for left column...
</div>
<div class="column">
	...contents for right column...
</div>

example slide

Tables

The default table style includes a distinct header and background shading on alternating rows. Using table, th, tr and td as you normally would, results in a styled table like this...

example slide

Integration with CyBrowser and CyCommands

CyBrowser allows for viewing any html page in Cytoscape. Together with CyCommands, this makes it possible to automate tutorial content with buttons and/or links. For example, if the tutorial describes how to load a network, a button to automatically load the network can be included.

Since these tutorials can be viewed in any web browser, and not just CyBrowser, but with a combination of javascript and css we can hide automation in all browsers other than CyBrowser. This is accomplished by enclosing the button code in a div, which in turn is controlled by javascript to hide it if the html is opened outside of CyBrowser.

To include a button, add a div of class "cybrowser". The example below adds a button that imports a specific network (galFiltered.sif), using the "network load url" CyCommand:

<pre><code data-trim>
<div class="cybrowser">
        <input type="button" class="btn btn-primary" onclick="cybrowser.executeCyCommand('network load url url=https://cytoscape.org/cytoscape-tutorials/protocols/data/galFiltered.sif');" value="Load network"/>
    </div>
</code></pre>

To hide the "cybrowser" div, and thus the button, outside of CyBrowser, the following javascript should be added to the parent index file. For example, if the automation code was added to a module.hml file, the javascript should be added to the body of the index.html file that includes that module. Similarly, there is also a "not-cybrowser" div class that can be used to customize content for regular browser viewing.

<pre><code data-trim>
<script>
	Reveal.addEventListener( 'ready', function() {
	if(!window.navigator.userAgent.includes('CyBrowser')){
		var divs = document.getElementsByClassName("cybrowser")
		for (var i=0;i<divs.length;i++){
			divs[i].style.display = "none";
		}
	} else {
		var divs = document.getElementsByClassName("not-cybrowser")
		for (var i=0;i<divs.length;i++){
			divs[i].style.display = "none";
		}
	}
});
</script>  
</code></pre>

Editing Cytoscape Theme

We have two customized stylesheets for presentations and protocols (.css). You can edit these CSS files directly, but understand that all presentations and protocols will be affected. If you want to make a custom stylesheets, please start a new CSS file.

|--css/theme/
|  |--cytoscape-presentation-1.css
|  |--cytoscape-protocol-1.css

If you are not sure where to make an edit, simply file a issue for the project and we'll advise or make the edit for you.

cytoscape-tutorials's People

Contributors

adamstuart avatar akmo3 avatar alexanderpico avatar ceofy avatar denisesl22 avatar dexterpratt avatar dotasek avatar egonw avatar khanspers avatar kozo2 avatar lukatoni avatar risserlin avatar rpillich avatar saddlerto avatar scootermorris avatar ugurdogrusoz avatar yihangx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cytoscape-tutorials's Issues

Formula for SLIST in new column

Hi,
How do I transfer parts of a string from one column to a new column by a function?
The existing columns do contain strings separated by ';', and I would like to transfer e.g. the third string of one cell into the new column.

Example: a column contains this taxonomic information:
d__Eukaryota;p__Basidiomycota;c__Agaricomycetes;o__Trechisporales;f__Hydnodontaceae;g__Trechispora
I would like to transfer the 3rd element (c__Agaricomycetes) into a new column.

I thought it should be possible with a function, but I could not fine the correct syntax to 1) split a string by a character (;) and transfer the 3rd string into the new field.
f(x)=SLIST($label...

Is RegEx possible in Catoscape?

Thank you for any suggestions!

grafik

16s micrbiome network analysis

Hello

I am new to cytoscape.

Could you please share with me a tutorial or simple steps to how to do network analysis of a 16s rRNA microbiome data I have collected?

Thanks very much
Marwa

New tutorial for WikiPathways phosphoproteomics data visualization

Many pathways have phosphosite information encoded as a structured comment on the node state, but nobody knows how to use this in Cytoscape to visualize data.
Once the tutorial exists, it should be linked to from the relevant stage in the WP Academy.

This should probably be a separate tutorial, as opposed to another workflow in the general WikiPathways App tutorial.

Updates to Legend Creator tutorial

  • Many slides are too wordy and concepts could be described more clearly
  • Replace the term "ramp functions"
  • The slides describing the current style options are confusing, consider replacing them with one slide showing how each visual style property is translated to the legend
  • Add more content about how the legend can be customized using Annotations panel
  • Important notes should be larger font (they are currently smaller than the normal font)

Create simple protocol based on STRING

Even better, we should extract out this simple, most common use case on it's own:

  1. query STRING by gene name (based on example dataset)
  2. load data (mapping via "query term" column)
  3. style network
  4. comment on largest connected subnetwork

This should be separated from the disease query use case. So, maybe just split the current tutorial into two: diff exp network viz and disease network viz.

Originally posted by @AlexanderPico in #50 (comment)

Update to EnrichmentMap Pipeline Tutorial

g:Profiler has changed since the tutorial was last updated. Many of the Advanced Options no longer exist and the location to download the GEM file is located in a different place. Overall, the webpage for g:Profiler also looks different. This makes it challenging to follow the EnrichmentMap Pipeline tutorial. Specifically, the section of the tutorial that demonstrates how to use g;Profiler to generate a GEM file needs to be updated.

New protocol: Getting Started Tour

Create a protocol with cybrowser links that is intended for new users of Cytoscape. A link within Cytoscape would open the protocol and provide an interactive tour of basic features.

Multiple node fill colour

Hi

Could anyone suggest a way to have different fill colours at the same time in a single node? Kind like a pie chart but the different parts are equally divided .

Thank you in advance

Basic visualization tutorial questions

This may be related to/mergeable with #3

I just started with Cytoscape but also am teaching it in a new modular graduate class. I started with the basic data visualization tutorial but realized I had some questions about the provenance of the data being used, where understanding that would improve my ability to both answer questions and extend the lesson to related learning objectives.

From the content of the tables pane, I inferred that the data being used is the same as what is included in the sampleData directory that comes with the CytoScape distribution. Based on the README in that directory, I am guessing about where the data comes from:

Gene expression

The README refers to
Ideker, T., Thorsson V, Ranish JA, Christmas R, Buhler J, Eng JK, Bumgarner R, Goodlett DR, Aebersold R, Hood L. Integrated genomic and proteomic analyses of a systematically perturbed metabolic network. Science, 292, 929-34 (2001).

I found the paper and downloaded the Excel file in the supplemental data. The README describes galExpData.csv as including information about 20 perturbations, but I think it's only 3 of the 20 in the paper. The column headings do not match those in the supplemental data. My guess is that the names are based on gene + condition + exp for expression or sig for significance (error bars?), where the 3 genes are knockouts of GAL1, GAL4, and GAL80, and the conditions are raffinose only (R) or raffinose + galactose (RG).

Thus the column that is the focus of the tutorial is gal80 knockout grown in raffinose, which is related to column V (gal80-gal) in the supplemental data file from Ideker et al. gal1RGexp is related to column E (gal1+gal) and gal4RGexp is related to column H (gal4 + gal). I couldn't find the data on either NCBI GEO or ArrayExpress.

  • are these guesses correct?
  • if yes, the numerical values don't match and it's not clear how the values were processed to generate the numbers provided.
  • if no, where does the data come from?

Interactions

Based on the identifiers, I'm guessing that the galFiltered.* comes from the yeastHighQuality.sif based on the von Mering and Lee papers. But again, the workflow for going from the supplemental data of the papers to the sif is not clear.

Thanks for any insight you can give on these.

Error importing files

I'll premise this by saying I'm not a novice with cytoscape. I have used this program for several years.

While working on a network, I was applying a new layout (yFiles). It seemed to freeze so I used task manager to end the cytoscape process. Now I can't import any new networks at all. I get the following error: 'No edges will be created in the network; the source column is not selected. Do you want to continue?'

I am most definitely selecting a column for source (green circle) and destination (green triangle). I created a basic example in excel with 3 columns and 3 rows to ensure it wasn't my dataset. Still nothing.

import table
import error

I uninstalled cytoscape. I restarted the computer. I deleted the 'CytoscapeConfiguration' folder for my user directory. I deleted all registry keys that I could find searching for 'cytoscape'. I reinstalled cytoscape. I still get the same error. I have tried this a few times now. Still nothing works.

Any help would be greatly appreciated.

Trouble with the basic data visualization tutorial: Dataset seems incomplete

I am trying to use the basic data visualization tutorial. I followed the steps for importing the GAL1 GAL4 GAL80 galFiltered network. The data set that downloads does not look like the one in the tutorial and is limited to two columns: "shared name" and "name". There are no other columns with expression data so once you get to changing the fill color etc, there are no columns with meaningful data to select.
Gal1Gal4Gal80filtered network.docx

Cyscape can't open Cys file

Cyscape can't open Cys file, and every time it is opened, it will get stuck. The same goes for uninstalling Cyscape and reinstalling it. Cys file is fine, you can open it with another computer's cytoscape.

Use EnrichmentMap app to visualise enriched pathways from selected UMAP clusters of a single cell RNAseq dataset

Hello,
I previously generated a Seurat object which contains clusters of cancer cells growing amongst healthy cells. There were 3 clusters of cancer cells readily recognisable by their distinct gene expression profile. I used Seurat to identify differentially expressed genes in the 3 cancer clusters of interest using the FindMarkers() command. Around 2000-3000 genes were found per cluster with varying log fold change and significance. I'd like to use as input to Cytoscape EnrichmentMap this list of genes, with a view to GSEA or gProfiler and then visualisation. gProfiler reported 'error' with no details so I did not persevere with that tool. Instead I moved on to GSEA and I followed this tutorial (https://cytoscape.org/cytoscape-tutorials/protocols/enrichmentmap-pipeline/#/) but it is hard work as the lower parts of the text in many webpages are truncated. I used both a Chrome and Safari browser and got the same result.
My question is:

  1. is it possible to use EnrichmentMap in the way I have described above (i.e. only a single list of ranked genes?)
  2. the text truncations mean it is really difficult to follow the tutorials. Can this please be looked at as soon as possible? Zooming out does not work.
  3. Is the below table the correct format for the .RNK file? (2 columns: gene column and avg_log_FC column)

Many thanks,
John

dge.cl7.dyCbo.2.rnk.txt

Scripted support for WikiPathways App data visualization workflow

This is a subset of issues from #86 that will be addressed by a scripted solution. The plan is to make r , python and javascript versions.

  • Ease of visualizing p value using node border color and weight
  • Ease of opening multiple pathways
  • Ease of importing data files to more than one pathway/network
  • We will make a third workflow for network-style pathways

Additional step for Diff Exp tutorial

A recent helpdesk question revealed that we are missing a major step in our intro tutorial on diff exp. We start with upregulated gene lists... but we don't have any fold change data associated with them. This is an odd case. We only show data overlay for the generic disease case and miss showing how to map your own data to your own protein query network.

Things to change:

  • We should prepare sample dataset with gene names, fold change and adjusted pvalues.
  • STRING query would be the same (using the gene names) https://cytoscape.org/cytoscape-tutorials/protocols/differentially-expressed-genes/#/5
  • The next step should be to upload the data and perform a basic node fill color mapping. This should happen before the enrichment analysis.
  • Skip the down regulated case. Just do a single example to keep it simple. The example could be BOTH up and down or just one or the other.

Better GUI tutorial support for WikiPathways data visualization

The current WikiPathways App tutorial describes a simple use case of importing pathways and visualizing data. From a discussion with a WikiPathways curator and workshop instructor (Freddie) it was clear that some aspects of data visualization on pathways in Cytoscape are not described explicitly so they are hard to find/learn for novice Cytoscape users. For example:

  • Visualizing multiple data points or types on pathways, aka 'striped nodes' (similar to what's described for PathVisio here)
  • Visualizing the same data on multiple pathways in an efficient way

These features are described elsewhere([1], [2]), but they should be described in the context of a WikiPathways data viz project.

One idea would be to expand the existing WP app tutorial so that it includes two separate use cases, one for basic data viz on one pathway (basically the current protocol), and a more advanced use case for loading multiple pathways, and visualizing multiple data points using custom graphics.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.