From 5c0d3a2b3058790ae1156b3ff27410eb6f9c1524 Mon Sep 17 00:00:00 2001 From: Andrew Duncan Date: Thu, 27 Sep 2018 15:12:28 -0400 Subject: [PATCH 1/4] Updated the setup for readme --- README.md | 47 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9d12700..11c0825 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,47 @@ # icgc-viewer -A plugin for JBrowse for viewing ICGC data +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. +## 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 RefSeq 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 @@ -121,4 +151,7 @@ Genes Tab: Mutations Tab: * View mutations that match the selected facets -* Create a track of all matching SSMs \ No newline at end of file +* Create a track of all matching SSMs + +# Miscellaneous +This is a catch all section. \ No newline at end of file From 5c88cf6dba63df0bf71b76c523b44b6ff51cf7c2 Mon Sep 17 00:00:00 2001 From: Andrew Duncan Date: Thu, 27 Sep 2018 16:00:47 -0400 Subject: [PATCH 2/4] added some more advanced track examples --- README.md | 11 +++++++---- data/advanced-tracks.conf | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 data/advanced-tracks.conf diff --git a/README.md b/README.md index 11c0825..0e62d44 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # icgc-viewer 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 +# Installation and Setup ## 1. Install JBrowse Quick setup of JBrowse - https://github.com/GMOD/jbrowse/#install-jbrowse-from-github-for-developers @@ -68,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: @@ -106,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: @@ -154,4 +154,7 @@ Mutations Tab: * Create a track of all matching SSMs # Miscellaneous -This is a catch all section. \ No newline at end of file +## 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. \ No newline at end of file diff --git a/data/advanced-tracks.conf b/data/advanced-tracks.conf new file mode 100644 index 0000000..db48a84 --- /dev/null +++ b/data/advanced-tracks.conf @@ -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 \ No newline at end of file From 47ff882c546871ea6efdfe64005a5a0fc5479744 Mon Sep 17 00:00:00 2001 From: Andrew Duncan Date: Thu, 27 Sep 2018 16:01:37 -0400 Subject: [PATCH 3/4] better title --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e62d44..1a32ad7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# icgc-viewer +# 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. # Installation and Setup From 9e6d55928308c7f120b728a58ee61ffef1fef43a Mon Sep 17 00:00:00 2001 From: Andrew Duncan Date: Fri, 28 Sep 2018 12:14:47 -0400 Subject: [PATCH 4/4] small readme changes and fix for pretty search --- README.md | 4 ++-- icgc-viewer/js/View/ICGCDialog.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1a32ad7..4ef460b 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ 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 RefSeq 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`. +## 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. diff --git a/icgc-viewer/js/View/ICGCDialog.js b/icgc-viewer/js/View/ICGCDialog.js index b81ac11..a1b7b18 100644 --- a/icgc-viewer/js/View/ICGCDialog.js +++ b/icgc-viewer/js/View/ICGCDialog.js @@ -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);