Skip to content

Commit

Permalink
Merge pull request #17 from agduncan94/develop
Browse files Browse the repository at this point in the history
Update README and label fix
  • Loading branch information
agduncan94 authored Sep 28, 2018
2 parents c00c14e + 771fbb9 commit fded711
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 14 deletions.
58 changes: 47 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,47 @@
# icgc-viewer
A plugin for JBrowse for viewing ICGC data
# ICGC JBrowse Plugin - Faceted Search and New Store Classes
A plugin for [JBrowse](https://jbrowse.org/) for viewing ICGC data. For any bugs, issues, or feature recommendations please create an issue through GitHub.

# Setup
See data/trackList.json and data/tracks.conf for the track files used to setup this plugin.
# Installation and Setup
## 1. Install JBrowse
Quick setup of JBrowse - https://github.com/GMOD/jbrowse/#install-jbrowse-from-github-for-developers

Remember to add the plugin to your configuration file.
## 2. Install Plugin
See [JBrowse - Installing Plugins](https://jbrowse.org/docs/plugins.html) for a general approach to installing plugins.

ICGC requires the GRCH37 Human reference files, which can be found at http://ftp.ensembl.org/pub/release-75/fasta/homo_sapiens/dna/.
For installing icgc-viewer plugin:
1) Copy the icgc-viewer folder into the JBrowse `plugins` directory.
2) Add 'icgc-viewer' to the array of plugins in the `jbrowse_conf.json`.

## 3. Install Reference Sequence Data
Now setup the reference sequence used. ICGC requires the GRCh37 Human reference files, which can be found at http://ftp.ensembl.org/pub/release-75/fasta/homo_sapiens/dna/. You'll want to download the files of the form `Homo_sapiens.GRCh37.75.dna.chromosome.1.fa.gz`.

Then you can use the `bin/prepare-refeqs.pl` command to generate the RefSeq information.

Below is an example of these two steps for Chr1.

You'll need to download the files and then add them to the refseq.
Ex. Chromosome 1
1. Download Homo_sapiens.GRCh37.75.dna.chromosome.1.fa.gz from the above site.
2. Setup refeq with bin/prepare-refseqs.pl --fasta Homo_sapiens.GRCh37.75.dna.chromosome.1.fa.gz
```
wget http://ftp.ensembl.org/pub/release-75/fasta/homo_sapiens/dna/Homo_sapiens.GRCh37.75.dna.chromosome.1.fa.gz
```
2. Setup refeq with the following command
```
bin/prepare-refseqs.pl --fasta Homo_sapiens.GRCh37.75.dna.chromosome.1.fa.gz
```
Note that you can specify multiple fast in one command by doing `--fasta fasta1.fa.gz --fasta fasta2.fa.gz ...`

## 4. Adding new tracks
We have some basic example tracks in `data/tracks.conf`. You can also add new tracks by using the ICGC Dialog accessible within JBrowse.

## 5. Run JBrowse
You'll have to run the following commands:

```
./setup.sh
utils/jb_run.js -p 3000
```

JBrowse should now be running with the ICGC Plugin working!

# Available Store SeqFeature
## icgcGenes
Expand All @@ -38,7 +68,7 @@ You can also use the filters field to pass filters to be applied to the track. T

To put it in the track config file you may want to minimize it as such:
```
filters: {"gene":{"type":{"is":["protein_coding"]}}}
filters={"gene":{"type":{"is":["protein_coding"]}}}
```

Example Track:
Expand Down Expand Up @@ -76,7 +106,7 @@ You can also use the filters field to pass filters to be applied to the track. T

To put it in the track config file you may want to minimize it as such:
```
filters: {"mutation":{"functionalImpact":{"is":["High"]}}}
filters={"mutation":{"functionalImpact":{"is":["High"]}}}
```

Example Track:
Expand Down Expand Up @@ -121,4 +151,10 @@ Genes Tab:

Mutations Tab:
* View mutations that match the selected facets
* Create a track of all matching SSMs
* Create a track of all matching SSMs

# Miscellaneous
## Advanced Usage of Tracks
You do not need to add tracks directly from the ICGC Dialog. You can also define them in the `tracks.conf` file.

See `data/advanced-tracks.conf` for some more complex usages, including filters.
35 changes: 35 additions & 0 deletions data/advanced-tracks.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[tracks.ICGC_Mutations]
storeClass=icgc-viewer/Store/SeqFeature/icgcSimpleSomaticMutations
type=JBrowse/View/Track/CanvasVariants
key=ICGC_Mutations
filters={"mutation":{"functionalImpact":{"is":["High"]}}}
maxMutationCount=300

[tracks.ICGC_Genes]
storeClass=icgc-viewer/Store/SeqFeature/icgcGenes
type=JBrowse/View/Track/CanvasVariants
key=ICGC_Genes
filters={"gene":{"type":{"is":["protein_coding"]}}}
maxGeneCount=400

[tracks.ICGC_Genes_donor_DO229446]
storeClass=icgc-viewer/Store/SeqFeature/icgcGenes
type=JBrowse/View/Track/CanvasVariants
key=ICGC_Genes_donor_DO229446
donor=DO229446
filters={"gene":{"type":{"is":["protein_coding"]}}}

[tracks.ICGC_SSMs_donor_DO229446]
storeClass=icgc-viewer/Store/SeqFeature/icgcSimpleSomaticMutations
type=JBrowse/View/Track/CanvasVariants
key=ICGC_SSMs_donor_DO229446
donor=DO229446
filters={"mutation":{"functionalImpact":{"is":["High"]}}}

[tracks.ICGC_CNSMs_donor_DO229446]
storeClass=icgc-viewer/Store/SeqFeature/icgcCNSM
type=JBrowse/View/Track/Wiggle/XYPlot
donor=DO229446
max_score=1
min_score=-1
bicolor_pivot=0
6 changes: 3 additions & 3 deletions icgc-viewer/js/View/ICGCDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@ function (
}
}
thisB.updateAccordion(type);
for (var type of thisB.types) {
thisB.updateSearchResults(type);
}
thisB.updateSearchResults('donor');
thisB.updateSearchResults('mutation');
thisB.updateSearchResults('gene');
}
}, 'checkbox').placeAt(facetCheckbox);
var label = dom.create("label", { "for" : facet + '-' + term.term + '-' + type + '-' + thisB.accordionId, innerHTML: term.term + ' (' + term.count + ')' }, facetCheckbox);
Expand Down

0 comments on commit fded711

Please sign in to comment.