forked from taylor-lab/facets-preview
-
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.
- Loading branch information
aprice
committed
Oct 3, 2024
1 parent
535458a
commit 6016f0a
Showing
12 changed files
with
274 additions
and
25,045 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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
FROM rocker/tidyverse:3.6.3-ubuntu18.04 | ||
|
||
LABEL maintainer="Adam Price ([email protected])" \ | ||
contributor="Anne Marie Noronha ([email protected])" \ | ||
contributor="Yixiao Gong ([email protected])" \ | ||
contributor="Nikhil Kumar ([email protected])" \ | ||
contributor="Philip Jonsson ([email protected])" \ | ||
version.image="0.0.1-rebuild" \ | ||
version.facets_suite="2.0.8" \ | ||
version.facets="0.5.14" \ | ||
version.alpine="3.8" \ | ||
version.pctGCdata="0.2.0" \ | ||
source.facets="https://github.com/mskcc/facets/archive/v0.5.14.tar.gz" | ||
|
||
ENV FACETS_SUITE_VERSION 2.0.8 | ||
ENV FACETS_VERSION 0.5.14 | ||
ENV FACETS_PREVIEW_VERSION 2.1.4 | ||
ENV PCTGCDATA 0.2.0 | ||
|
||
RUN sed -i '/jessie-updates/d' /etc/apt/sources.list | ||
|
||
# Requirements | ||
RUN apt-get -y update && apt-get upgrade -y && apt-get install -y --fix-missing apt-utils nano wget\ | ||
g++ \ | ||
tar \ | ||
bzip2 \ | ||
libbz2-dev \ | ||
libc6-dev \ | ||
libxt-dev \ | ||
liblzma-dev \ | ||
libgtk2.0-dev \ | ||
libcairo2-dev \ | ||
xvfb \ | ||
xauth \ | ||
xfonts-base | ||
RUN apt-get install -y xdg-utils --fix-missing | ||
RUN apt-get install -y inotify-tools | ||
|
||
RUN R -e "install.packages(c('Cairo','argparse','gridExtra', 'binom', 'BiocManager', 'diptest', 'egg','shinyWidgets', 'shinyjs', 'rhandsontable', 'doParallel', 'configr', 'R.utils'), repos='http://cran.us.r-project.org')" \ | ||
&& R -e "BiocManager::install('rtracklayer')" | ||
|
||
# Install FACETS, pctGCdata and facets-suite | ||
RUN cd /tmp \ | ||
&& wget https://github.com/mskcc/facets-suite/archive/${FACETS_SUITE_VERSION}.tar.gz -O facets-suite-${FACETS_SUITE_VERSION}.tar.gz \ | ||
&& wget https://github.com/mskcc/facets/archive/v${FACETS_VERSION}.tar.gz -O facets-v${FACETS_VERSION}.tar.gz \ | ||
&& wget https://github.com/mskcc/pctGCdata/archive/v${PCTGCDATA}.tar.gz \ | ||
&& git clone --single-branch --branch main https://github.com/mskcc/fp-docker.git facets-preview-master \ | ||
&& tar xvzf facets-v${FACETS_VERSION}.tar.gz \ | ||
&& tar xvzf v${PCTGCDATA}.tar.gz \ | ||
&& tar xvzf facets-suite-${FACETS_SUITE_VERSION}.tar.gz \ | ||
&& cd /tmp/pctGCdata-${PCTGCDATA} \ | ||
&& R CMD INSTALL . \ | ||
&& cd /tmp/facets-${FACETS_VERSION} \ | ||
&& R CMD INSTALL . \ | ||
&& cd /tmp/facets-suite-${FACETS_SUITE_VERSION} \ | ||
&& R CMD INSTALL . \ | ||
# correct shebang line | ||
&& sed -i "s/opt\/common\/CentOS_6-dev\/R\/R-3.2.2\//usr\//g" *.R \ | ||
# copy execs to /usr/bin/facets-suite | ||
&& mkdir -p /usr/bin/facets-suite/ \ | ||
&& cp -r /tmp/facets-suite-${FACETS_SUITE_VERSION}/* /usr/bin/facets-suite/ \ | ||
&& cd /tmp/facets-preview-master \ | ||
&& R CMD INSTALL . \ | ||
&& mkdir -p /usr/bin/facets-preview/ \ | ||
&& cp -r /tmp/facets-preview-master/* /usr/bin/facets-preview/ \ | ||
# clean up | ||
&& rm -rf /var/cache/apk/* /tmp/* # update to using release version when 2.1.5+ is released. | ||
|
||
ENV PYTHONNOUSERSITE set | ||
ENV FACETS_OVERRIDE_EXITCODE set | ||
|
||
COPY fp_config.json /usr/bin/facets-preview/ | ||
RUN chmod 744 /usr/bin/facets-preview/fp_config.json | ||
EXPOSE 3838 |
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,22 @@ | ||
{ | ||
"repo": [ | ||
{ | ||
"name": "Tempo", | ||
"manifest_file": "/Users/noronhaa/Documents/facets_img_test/manifest.txt.gz", | ||
"tumor_id_format": "", | ||
"counts_file_format": "{sample_id}.snp_pileup.gz" | ||
} | ||
], | ||
"watcher_dir": "/Users/aprice/mskcc/pipelines/fp-docker/Docker/watcher_dir", | ||
"facets_lib": [ | ||
{ | ||
"version": "0.5.14", | ||
"lib_path": "/usr/local/lib/R/site-library/" | ||
} | ||
], | ||
"verify_sshfs_mount" : "", | ||
"r_script_path" : "/usr/local/bin/Rscript", | ||
"facets_suite_lib": "/usr/local/lib/R/site-library/", | ||
"facets_suite_run_wrapper": "/usr/bin/facets-suite/run-facets-wrapper.R", | ||
"facets_qc_script": "/usr/bin/facets-preview/facets_qc/v1.0/facets_fit_qc.R" | ||
} |
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,22 @@ | ||
{ | ||
"repo": [ | ||
{ | ||
"name": "Clinical series IMPACT", | ||
"manifest_file": "/juno/work/ccs/shared/resources/impact/facets/manifests/impact_facets_manifest_latest.txt.gz", | ||
"tumor_id_format": "^P-\\d{7}-T\\d+-IM\\d(,P-\\d{7}-T\\d+-IM\\d)*$", | ||
"counts_file_format": "countsMerged____{sample_id}.dat.gz" | ||
} | ||
], | ||
"watcher_dir": "/juno/work/ccs/shared/software/refit_watcher/", | ||
"facets_lib": [ | ||
{ | ||
"version": "0.5.14", | ||
"lib_path": "/usr/local/lib/R/site-library/facets/" | ||
} | ||
], | ||
"verify_sshfs_mount" : "", | ||
"r_script_path" : "/usr/local/bin/Rscript", | ||
"facets_suite_lib": "/usr/local/lib/R/site-library/", | ||
"facets_suite_run_wrapper": "/usr/bin/facets-suite/run-facets-wrapper.R", | ||
"facets_qc_script": "/usr/bin/facets-preview/facets_qc/v1.0/facets_fit_qc.R" | ||
} |
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 |
---|---|---|
@@ -1,5 +1,32 @@ | ||
## NOTE: This is a fork from the main facets-preview repo at taylor-lab/facets-preview/. | ||
## This was created to handle modifications for the OnDemand facets preview service by Adam Price. | ||
|
||
# facets-preview | ||
`facets-preview` is an R shiny based desktop app that enables loading, reviewing and annotating fits as well as function to generate downstream genomic calls. For documentation, go to: https://bandla-chai.gitbook.io/facets-preview/ | ||
# Facets Preview | ||
`facets-preview` is an R shiny based desktop app that enables loading, reviewing and annotating fits as well as function to generate downstream genomic calls. This repository represents the build used for the docker container at price0416/fp_docker. | ||
|
||
# FAQs | ||
* Please check our [FAQ section](faq.md) for information on commonly asked FACETS-related issues. | ||
|
||
# Setup Instructions | ||
|
||
## Setup Docker on your local computer. | ||
* [Mac Install](https://docs.docker.com/desktop/install/mac-install/) | ||
|
||
## Pull the Docker Image to your local computer. | ||
* Open a terminal and pull the docker image with `docker pull price0416/fp_docker` | ||
|
||
## Prepare access to your FACETS data from remote sources. | ||
* If you want to access FACETS data on a remote machine (i.e. pyr/juno), setup [macFUSE](https://osxfuse.github.io/). | ||
* Make a local drive to host your mount, i.e. `mkdir ~/mskcc/juno/impact/facets` | ||
* Add a mount command to your ~/.bash_profile on your local computer. For example, to mount pyr, `alias mountfacetspyr='sudo umount -f ~/mskcc/juno/impact/facets || sshfs [email protected]:/rtsess01/compute/juno/cmo/juno/work/ccs/shared/resources/impact/facets ~/mskcc/juno/impact/facets -o auto_cache -o defer_permissions -o local -o IdentityFile=/Users/yourUser/.ssh/id_rsa -o reconnect -o transform_symlinks -o follow_symlinks'` | ||
* Run your bash_profile. `source ~/.bash_profile` | ||
* Mount the remote location. `mountfacetspyr`. This will create a remote mount of the drive to your local drive, in this example at `~/mskcc/juno/impact/facets`. Note that you may need to execute this command twice, as the first execution attempt will sometimes ask for your local adminstrator password, and the second attempt will ask for your remote login credentials. | ||
* Navigate to the mounted directory. `cd ~/mskcc/juno/impact/facets` | ||
|
||
## Run the Docker Image | ||
* Run the docker image. `docker run -v $PWD:$PWD --workdir $PWD -p 3838:3838 --name test --rm -i -t price0416/fp_docker /bin/bash`. You will notice the prompt on your terminal now shows `root@randomNumberString`. At this point you are inside the running container. If you ever need to exit the container, use CTRL+D. | ||
* Start FACETS Preview with the following command from inside the running container. `Rscript -e "facets_preview_config_file = '/usr/bin/facets-preview/fp_config.json' ; options(shiny.port = 3838, shiny.host = '0.0.0.0', shiny.launch.browser = FALSE) ; library(facetsPreview); facetsPreview::launch_application()"` | ||
* Open a browser and navigate to [http://0.0.0.0:3838/](http://0.0.0.0:3838/) | ||
* FACETS Preview should load. | ||
|
||
## Loading a Sample | ||
* Note that in this version of FACETS Preview that samples can only be loaded using the "Paste facets run directories" box at the bottom of the load screen. | ||
* Provide full paths to the samples you want to load in this box. If they are not found or do not load properly, be sure to confirm that you started your docker image after navigating to the target facets data location before starting the container. i.e. `cd ~/mskcc/juno/impact/facets` |
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
Oops, something went wrong.