Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/docker 1.2.1 #51

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ ENV PATH=/root/miniconda3/bin:${PATH}

# add conda channels and install softwares
RUN conda config --add channels defaults && conda config --add channels conda-forge && \
conda config --add channels bioconda && conda install -c liulab-dfci maestro=1.2.1 && \
conda install mamba -c conda-forge && mamba create -n lisa -c qinqian lisa=1.0
conda config --add channels bioconda && conda create -n MAESTRO -c liulab-dfci maestro=1.2.1 && \
conda install mamba -c conda-forge && mamba create -n lisa -y -c qinqian lisa=1.0


# install giggle and rabit
Expand Down
50 changes: 29 additions & 21 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# MAESTRO v1.1.0 docker
# MAESTRO v1.2.1 docker

If it is difficult to install MAESTRO because of the system configuration, users can adopt an alternative way to get MAESTRO running through a docker container.

Expand All @@ -19,70 +19,79 @@ The docker distribution includes the latest MAESTRO conda package, as well as RA
Please use the following commands to the pull the MAESTRO docker image.

``` bash
$ sudo docker pull winterdongqing/maestro:1.1.0
$ sudo docker pull winterdongqing/maestro:1.2.1
$ sudo docker image list
REPOSITORY TAG IMAGE ID CREATED SIZE
winterdongqing/maestro 1.1.0 831bfd245e63 3 hours ago 8.7GB
winterdongqing/maestro 1.2.1 57f41ffbe200 4 hours ago 9.6GB
```

### Run in the container

To run the MAESTRO container, please use the following commands. The ```-v``` flag mounts the current directory ```/home1/wangchenfei``` into ```/root/MAESTRO``` in the container.
To run the MAESTRO container, please use the following commands. The ```-v``` flag mounts the current directory ```/home1/user``` into ```/root/MAESTRO``` in the container.

```bash
$ pwd
/home1/wangchenfei
/home1/user
$ ls
annotations docker miniconda3 ncbi Project R tmp Tool
$ sudo docker run -v /home1/wangchenfei:/root/MAESTRO -it winterdongqing/maestro:1.1.0
$ sudo docker run -v /home1/user:/root/MAESTRO -it winterdongqing/maestro:1.2.1
```

```#``` means that users have been in the container. There are four folders in the ```root``` directory of the container. The ```Annotation``` directory stores the RABIT index and GIGGLE index. Users can access local data and locally installed softwares through the ```MAESTRO```.

```bash
root@45c5df8b6635:~# ls
root@c561fe9a9410:~# ls
MAESTRO miniconda3
root@45c5df8b6635:~# conda env list
root@c561fe9a9410:~# conda env list
# conda environments:
#
base * /root/miniconda3
MAESTRO /root/miniconda3/envs/MAESTRO
lisa /root/miniconda3/envs/lisa

root@45c5df8b6635:~# cd MAESTRO/ && ls
root@c561fe9a9410:~# cd MAESTRO/ && ls
Project R Tool annotations docker miniconda3 ncbi tmp
```

Then users can run MAESTRO following the [tutorial](../example/ATAC_infrastructure_10x/ATAC_infrastructure_10x.md).
```bash
root@45c5df8b6635:~/MAESTRO# cd ~/MAESTRO/Project/SingleCell/scATAC/Analysis/
root@45c5df8b6635:~/MAESTRO/Project/SingleCell/scATAC/Analysis# MAESTRO scatac-init -d 10X_PBMC_1k_MAESTRO_V110_docker \
root@c561fe9a9410:~# source activate MAESTRO
(MAESTRO) root@c561fe9a9410:~# cd ~/MAESTRO/Project/SingleCell/scATAC/Analysis/
(MAESTRO) root@c561fe9a9410:~/MAESTRO/Project/SingleCell/scATAC/Analysis# MAESTRO scatac-init -d 10X_PBMC_1k_MAESTRO_V121_docker \
--fastq-dir /root/MAESTRO/Project/SingleCell/scATAC/Analysis/10X_PBMC_1k/Data/atac_pbmc_1k_v1_fastqs --fastq-prefix atac_pbmc_1k_v1 \
--outprefix 10X_PBMC_1k_MAESTRO_V110 \
--outprefix 10X_PBMC_1k_MAESTRO \
--whitelist /root/MAESTRO/Tool/cellranger-atac-1.1.0/cellranger-atac-cs/1.1.0/lib/python/barcodes/737K-cratac-v1.txt \
--giggleannotation /root/MAESTRO/Project/SingleCell/scATAC/Code/MAESTRO_V110/MAESTRO/annotations/giggle \
--fasta /root/MAESTRO/annotations/MAESTRO/Refdata_scATAC_MAESTRO_GRCh38_1.1.0/GRCh38_genome.fa
root@45c5df8b6635:~/MAESTRO/Project/SingleCell/scATAC/Analysis# cd 10X_PBMC_1k_MAESTRO_V110_docker
root@45c5df8b6635:~/MAESTRO/Project/SingleCell/scATAC/Analysis# ls
--giggleannotation /root/MAESTRO/annotations/MAESTRO/giggle.all \
--fasta /root/MAESTRO/annotations/MAESTRO/Refdata_scATAC_MAESTRO_GRCh38_1.1.0/GRCh38_genome.fa \
--annotation --method RP-based --signature human.immune.CIBERSORT --clusterpeak --rpmodel Enhanced
(MAESTRO) root@c561fe9a9410:~/MAESTRO/Project/SingleCell/scATAC/Analysis# cd 10X_PBMC_1k_MAESTRO_V121_docker
(MAESTRO) root@c561fe9a9410:~/MAESTRO/Project/SingleCell/scATAC/Analysis/10X_PBMC_1k_MAESTRO_V121_docker# ls
Snakefile config.yaml
```

Once configured, users can use snakemake to run the workflow as they do in their local system.

```bash
root@45c5df8b6635:~/MAESTRO/Project/SingleCell/scATAC/Analysis/10X_PBMC_1k_MAESTRO_V110_docker# snakemake -np
(MAESTRO) root@c561fe9a9410:~/MAESTRO/Project/SingleCell/scATAC/Analysis/10X_PBMC_1k_MAESTRO_V121_docker# snakemake -np
Building DAG of jobs...
Job counts:
count jobs
1 all
1 scatac_allpeakcall
1 scatac_analysis
1 scatac_bamaddCB
1 scatac_bamcluster
1 scatac_bamindex
1 scatac_barcodecorrect
1 scatac_countpeak
1 scatac_fqaddbarcode
1 scatac_fragmentcorrect
1 scatac_fragmentgenerate
1 scatac_fragmentindex
1 scatac_genescore
1 scatac_map
1 scatac_mergepeak
1 scatac_preprocess
1 scatac_qcfilter
1 scatac_qcplot
1 scatac_qcstat_bulk
Expand All @@ -91,17 +100,16 @@ Job counts:
1 scatac_qcstat_singlecell
1 scatac_report
1 scatac_rmdp
18

24
...
...
...

This was a dry-run (flag -n). The order of jobs does not reflect the order of execution.
root@45c5df8b6635:~/MAESTRO/Project/SingleCell/scATAC/Analysis/10X_PBMC_1k_MAESTRO_V110_docker# nohup snakemake --cores 10 > 10X_PBMC_1k_MAESTRO_V110_docker.out &
(MAESTRO) root@c561fe9a9410:~/MAESTRO/Project/SingleCell/scATAC/Analysis/10X_PBMC_1k_MAESTRO_V121_docker# nohup snakemake --cores 10 > 10X_PBMC_1k_MAESTRO_V121_docker.out &
```

## Built with
* Ubuntu 18.04 docker image
* miniconda3
* R 3.6.2
* R 4.0.2