-
Notifications
You must be signed in to change notification settings - Fork 57
/
.travis.yml
69 lines (57 loc) · 2.87 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
before_install:
- if test -e $HOME/miniconda/bin; then
echo "miniconda already installed.";
export PATH="$HOME/miniconda/bin:$PATH";
else
if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi;
rm -rf $HOME/miniconda;
bash miniconda.sh -b -p $HOME/miniconda;
export PATH="$HOME/miniconda/bin:$PATH";
hash -r;
conda config --add channels defaults;
conda config --add channels bioconda;
conda config --add channels conda-forge;
conda config --set always_yes yes --set changeps1 no;
conda update -q -n base conda;
conda info -a;
fi
- export TEST_ENV="test";
- if test -e $HOME/miniconda/envs/$TEST_ENV/lib/R/library/reticulate; then
echo "test env already created.";
else
conda config --add channels defaults;
conda config --add channels bioconda;
conda config --add channels conda-forge;
conda create -q -y -n $TEST_ENV r-reticulate anndata loompy;
conda install -q -y -n $TEST_ENV bioconductor-singlecellexperiment bioconductor-loomexperiment r-seurat=4 "r-deldir>=1.0.2" r-monocle3;
fi;
install:
- source activate "$TEST_ENV"
- R CMD INSTALL .
before_script:
- mkdir -p data
- wget http://seurat.nygenome.org/src/contrib/pbmc3k.SeuratData_3.1.4.tar.gz
- tar xzvf pbmc3k.SeuratData_3.1.4.tar.gz
script:
- Rscript -e 'load("pbmc3k.SeuratData/data/pbmc3k.rda")'
-e 'library(sceasy)'
-e 'srt <- pbmc3k'
-e 'dir.create("data")'
-e 'sceasy::convertFormat(srt, from="seurat", to="anndata", outFile="data/pbmc3k_seurat_anndata.h5ad")'
-e 'sce <- sceasy::convertFormat(srt, from="seurat", to="sce", outFile="data/pbmc3k_seurat_sce.rds")'
-e 'sceasy::convertFormat(sce, from="sce", to="anndata", outFile="data/pbmc3k_seurat_sce_anndata.h5ad")'
-e 'sceasy::convertFormat("data/pbmc3k_seurat_anndata.h5ad", from="anndata", to="cds", outFile="data/pbmc3k_seurat_anndata_cds.rds")'
-e 'sceasy::convertFormat(sce, from="sce", to="loom", outFile="data/pbmc3k_seurat_sce_loom.loom")'
-e 'sceasy::convertFormat("data/pbmc3k_seurat_sce_loom.loom", from="loom", to="anndata", outFile="data/pbmc3k_seurat_sce_loom_anndata.h5ad")'
-e 'sceasy::convertFormat("data/pbmc3k_seurat_sce_loom.loom", from="loom", to="sce", outFile="data/pbmc3k_seurat_sce_loom_sce.rds", main_layer_name="scaled")'
cache:
directories:
- $HOME/miniconda
before_cache:
- if ! [[ $TRAVIS_TAG ]]; then rm -rf $HOME/miniconda/conda-bld; fi
- Rscript -e 'remove.packages("sceasy")'
- rm -rf $HOME/miniconda/locks $HOME/miniconda/pkgs $HOME/miniconda/var $HOME/miniconda/conda-meta/history