diff --git a/scripts/Makefile b/scripts/Makefile deleted file mode 100644 index 4bdec5e..0000000 --- a/scripts/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -all: - - -run: install - python ../scpipe/r_pipeline.py - -install: - tar zcvf SCclust_0.1.7.tar.gz SCclust - Rscript -e 'install.packages("SCclust_0.1.7.tar.gz", repos = NULL, type="source")' diff --git a/scripts/SCclust-1.0.0RC2.tar.gz b/scripts/SCclust-1.0.0RC2.tar.gz deleted file mode 100644 index 7e1baf9..0000000 Binary files a/scripts/SCclust-1.0.0RC2.tar.gz and /dev/null differ diff --git a/scripts/SCclust-1.0.0RC3.tar.gz b/scripts/SCclust-1.0.0RC3.tar.gz deleted file mode 100644 index cb95309..0000000 Binary files a/scripts/SCclust-1.0.0RC3.tar.gz and /dev/null differ diff --git a/scripts/conda-environment.yml b/scripts/conda-environment.yml deleted file mode 100644 index d57fea9..0000000 --- a/scripts/conda-environment.yml +++ /dev/null @@ -1,221 +0,0 @@ -name: sgains3 -channels: -- conda-forge -- bioconda -- r -- defaults -dependencies: -- bcftools=1.5=3 -- bleach=1.4.2=py36_0 -- bowtie=1.2.1.1=py36pl5.22.0_0 -- htslib=1.5=0 -- perl-threaded=5.22.0=10 -- pysam=0.12.0.1=py36_htslib1.5_1 -- r-bh=1.60.0_2=r3.3.2_0 -- r-car=2.1_4=r3.3.2_0 -- r-catools=1.17.1=r3.3.2_1 -- r-data.table=1.10.4=r3.3.2_0 -- r-digest=0.6.12=r3.3.2_0 -- r-dplyr=0.5.0=r3.3.2_1 -- r-ggplot2=2.2.1=r3.3.2_0 -- r-htmlwidgets=0.5=r3.3.2_0 -- r-psych=1.5.8=r3.3.2_0 -- r-purrr=0.2.2=1 -- r-scales=0.4.1=r3.3.2_1 -- r-tibble=1.2=r3.3.2_1 -- r-yaml=2.1.13=r3.3.2_1 -- samtools=1.5=2 -- sra-tools=2.8.2=0 -- tbb=4.4_20150728=0 -- perl=5.22.0.1=0 -- biopython=1.69=np113py36_0 -- bzip2=1.0.6=h0376d23_1 -- ca-certificates=2017.08.26=h1d4fec5_0 -- cairo=1.14.8=0 -- certifi=2017.7.27.1=py36h8b7b77e_0 -- curl=7.54.1=0 -- decorator=4.1.2=py36hd076ac8_0 -- entrypoints=0.2.3=py36h1aec115_2 -- fontconfig=2.12.1=3 -- freetype=2.5.5=2 -- glib=2.50.2=1 -- gmp=6.1.2=hb3b607b_0 -- gsl=2.2.1=0 -- harfbuzz=0.9.39=2 -- html5lib=0.999999999=py36h2cfc398_0 -- icu=54.1=0 -- intel-openmp=2018.0.0=h15fc484_7 -- ipykernel=4.6.1=py36hbf841aa_0 -- ipython=6.1.0=py36hc72a948_1 -- ipython_genutils=0.2.0=py36hb52b0d5_0 -- jbig=2.1=hdba287a_0 -- jedi=0.10.2=py36h552def0_0 -- jinja2=2.9.6=py36h489bce4_1 -- jpeg=8d=2 -- jsonschema=2.6.0=py36h006f8b5_0 -- jupyter_client=5.1.0=py36h614e9ea_0 -- jupyter_core=4.3.0=py36h357a921_0 -- krb5=1.13.2=0 -- libedit=3.1=heed3624_0 -- libffi=3.2.1=h4deb6c0_3 -- libgcc=5.2.0=0 -- libgcc-ng=7.2.0=hcbc56d2_1 -- libgfortran-ng=7.2.0=h6fcbd8e_1 -- libiconv=1.14=0 -- libpng=1.6.30=1 -- libsodium=1.0.13=h31c71d8_2 -- libssh2=1.8.0=h8c220ad_2 -- libstdcxx-ng=7.2.0=h24385c6_1 -- libtiff=4.0.6=2 -- libxml2=2.9.4=0 -- markupsafe=1.0=py36hd9260cd_1 -- mistune=0.7.4=py36hbab8784_0 -- mkl=2018.0.0=hb491cac_4 -- nbconvert=5.3.1=py36hb41ffb7_0 -- nbformat=4.4.0=py36h31c9010_0 -- ncurses=6.0=h06874d7_1 -- notebook=5.0.0=py36h0b20546_2 -- numpy=1.13.1=py36h5bc529a_2 -- openssl=1.0.2l=h9d1a558_3 -- pandas=0.20.3=py36h842e28d_2 -- pandoc=1.19.2.1=hea2e7c5_1 -- pandocfilters=1.4.2=py36ha6701b7_1 -- pango=1.40.3=1 -- pcre=8.39=1 -- pexpect=4.2.1=py36h3b9d41b_0 -- pickleshare=0.7.4=py36h63277f8_0 -- pip=9.0.1=py36h30f8307_2 -- pixman=0.34.0=ha72d70b_1 -- prompt_toolkit=1.0.15=py36h17d85b1_0 -- ptyprocess=0.5.2=py36h69acd42_0 -- pygments=2.2.0=py36h0d3125c_0 -- python=3.6.2=0 -- python-dateutil=2.6.1=py36h88d3b88_1 -- pytz=2017.2=py36hc2ccc2a_1 -- pyzmq=16.0.2=py36_0 -- readline=6.2=2 -- setuptools=36.5.0=py36he42e2e1_0 -- simplegeneric=0.8.1=py36h2cb9092_0 -- six=1.10.0=py36hcac75e4_1 -- sqlite=3.13.0=0 -- terminado=0.6=py36ha25a19f_0 -- testpath=0.3.1=py36h8cadb63_0 -- tk=8.5.18=0 -- tornado=4.5.2=py36h1283b2a_0 -- traitlets=4.3.2=py36h674d592_0 -- wcwidth=0.1.7=py36hdf4376a_0 -- webencodings=0.5.1=py36h800622e_1 -- wheel=0.29.0=py36he7f4e38_1 -- xz=5.2.3=h2bcbf08_1 -- zeromq=4.1.5=0 -- zlib=1.2.8=3 -- r-assertthat=0.1=r3.3.2_4 -- r-backports=1.0.4=r3.3.2_0 -- r-base=3.3.2=0 -- r-base64enc=0.1_3=r3.3.2_0 -- r-bitops=1.0_6=r3.3.2_2 -- r-boot=1.3_18=r3.3.2_0 -- r-broom=0.4.1=r3.3.2_0 -- r-caret=6.0_73=r3.3.2_0 -- r-class=7.3_14=r3.3.2_0 -- r-cluster=2.0.5=r3.3.2_0 -- r-codetools=0.2_15=r3.3.2_0 -- r-colorspace=1.3_1=r3.3.2_0 -- r-crayon=1.3.2=r3.3.2_0 -- r-curl=2.3=r3.3.2_0 -- r-dbi=0.5_1=r3.3.2_0 -- r-dichromat=2.0_0=r3.3.2_2 -- r-essentials=1.5.2=r3.3.2_0 -- r-evaluate=0.10=r3.3.2_0 -- r-forcats=0.1.1=r3.3.2_0 -- r-foreach=1.4.3=r3.3.2_0 -- r-foreign=0.8_67=r3.3.2_0 -- r-formatr=1.4=r3.3.2_0 -- r-gistr=0.3.6=r3.3.2_0 -- r-glmnet=2.0_5=r3.3.2_0 -- r-gtable=0.2.0=r3.3.2_0 -- r-haven=1.0.0=r3.3.2_0 -- r-hexbin=1.27.1=r3.3.2_0 -- r-highr=0.6=r3.3.2_0 -- r-hms=0.3=r3.3.2_0 -- r-htmltools=0.3.5=r3.3.2_0 -- r-httpuv=1.3.3=r3.3.2_0 -- r-httr=1.2.1=r3.3.2_0 -- r-irdisplay=0.4.4=r3.3.2_0 -- r-irkernel=0.7.1=r3.3.2_0 -- r-iterators=1.0.8=r3.3.2_0 -- r-jsonlite=1.1=r3.3.2_0 -- r-kernsmooth=2.23_15=r3.3.2_0 -- r-knitr=1.15.1=r3.3.2_0 -- r-labeling=0.3=r3.3.2_2 -- r-lattice=0.20_34=r3.3.2_0 -- r-lazyeval=0.2.0=r3.3.2_0 -- r-lme4=1.1_12=r3.3.2_0 -- r-lubridate=1.6.0=r3.3.2_0 -- r-magrittr=1.5=r3.3.2_2 -- r-maps=3.1.1=r3.3.2_0 -- r-markdown=0.7.7=r3.3.2_2 -- r-mass=7.3_45=r3.3.2_0 -- r-matrix=1.2_7.1=r3.3.2_0 -- r-matrixmodels=0.4_1=r3.3.2_0 -- r-mgcv=1.8_16=r3.3.2_0 -- r-mime=0.5=r3.3.2_0 -- r-minqa=1.2.4=r3.3.2_2 -- r-mnormt=1.5_5=r3.3.2_0 -- r-modelmetrics=1.1.0=r3.3.2_0 -- r-modelr=0.1.0=r3.3.2_0 -- r-munsell=0.4.3=r3.3.2_0 -- r-nlme=3.1_128=r3.3.2_0 -- r-nloptr=1.0.4=r3.3.2_2 -- r-nnet=7.3_12=r3.3.2_0 -- r-openssl=0.9.5=r3.3.2_0 -- r-pbdzmq=0.2_4=r3.3.2_0 -- r-pbkrtest=0.4_6=r3.3.2_0 -- r-plyr=1.8.4=r3.3.2_0 -- r-pryr=0.1.2=r3.3.2_0 -- r-quantmod=0.4_7=r3.3.2_0 -- r-quantreg=5.29=r3.3.2_0 -- r-r6=2.2.0=r3.3.2_0 -- r-randomforest=4.6_12=r3.3.2_0 -- r-rbokeh=0.5.0=r3.3.2_0 -- r-rcolorbrewer=1.1_2=r3.3.2_3 -- r-rcpp=0.12.8=r3.3.2_0 -- r-rcppeigen=0.3.2.9.0=r3.3.2_0 -- r-readr=1.0.0=r3.3.2_0 -- r-readxl=0.1.1=r3.3.2_0 -- r-recommended=3.3.2=r3.3.2_0 -- r-repr=0.10=r3.3.2_0 -- r-reshape2=1.4.2=r3.3.2_0 -- r-rmarkdown=1.3=r3.3.2_0 -- r-rpart=4.1_10=r3.3.2_0 -- r-rprojroot=1.1=r3.3.2_0 -- r-rvest=0.3.2=r3.3.2_0 -- r-selectr=0.3_0=r3.3.2_0 -- r-shiny=0.14.2=r3.3.2_0 -- r-sourcetools=0.1.5=r3.3.2_0 -- r-sparsem=1.74=r3.3.2_0 -- r-spatial=7.3_11=r3.3.2_0 -- r-stringi=1.1.2=r3.3.2_0 -- r-stringr=1.1.0=r3.3.2_0 -- r-survival=2.40_1=r3.3.2_0 -- r-tidyr=0.6.0=r3.3.2_0 -- r-tidyverse=1.0.0=r3.3.2_0 -- r-ttr=0.23_1=r3.3.2_0 -- r-uuid=0.1_2=r3.3.2_0 -- r-xml2=1.0.0=r3.3.2_0 -- r-xtable=1.8_2=r3.3.2_0 -- r-xts=0.9_7=r3.3.2_2 -- r-zoo=1.7_13=r3.3.2_0 -- pip: - - ipython-genutils==0.2.0 - - jupyter-client==5.1.0 - - jupyter-core==4.3.0 - - prompt-toolkit==1.0.15 - - py==1.4.34 - - pytest==3.2.2 - - pytest-asyncio==0.8.0 - - python-box==3.1.1 - - pyyaml==3.12 - - setproctitle==1.1.10 - - termcolor==1.1.0 - diff --git a/scripts/setup.R b/scripts/setup.R deleted file mode 100644 index 0ae5efa..0000000 --- a/scripts/setup.R +++ /dev/null @@ -1,9 +0,0 @@ -library(devtools) - - -source("https://bioconductor.org/biocLite.R") -biocLite("DNAcopy") - -install.packages("futile.logger") - -install.packages("SCclust-1.0.0RC3.tar.gz", repos = NULL, type="source") \ No newline at end of file diff --git a/setup.py b/setup.py index 9958027..4ac0149 100644 --- a/setup.py +++ b/setup.py @@ -13,14 +13,22 @@ long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/KrasnitzLab/sgains", - packages=setuptools.find_packages( - # 'sgains', - exclude=[ - 'docs', 'tests', - 'commands.tests', - 'pipeline.tests', - ] - ), + # packages=setuptools.find_packages( + # # 'sgains', + # exclude=[ + # 'docs', 'tests', + # 'commands.tests', + # 'pipeline.tests', + # ] + # ), + packages=['sgains', 'sgains.commands', 'sgains.pipelines'], + package_dir={ + 'sgains': 'sgains', + }, + package_data={ + 'sgains': ['scripts/*.R'], + }, + include_package_data=True, entry_points={ 'console_scripts': [ 'sgains-tools=sgains.cli:main', diff --git a/sgains/pipelines/r_pipeline.py b/sgains/pipelines/r_pipeline.py index 66947b8..4a1bda3 100644 --- a/sgains/pipelines/r_pipeline.py +++ b/sgains/pipelines/r_pipeline.py @@ -3,11 +3,15 @@ @author: lubo ''' -import subprocess -from sgains.config import Config, NonEmptyWorkDirectory import os -from termcolor import colored +import sys + import shutil +import subprocess + +from termcolor import colored + +from sgains.config import Config, NonEmptyWorkDirectory class Rpipeline(object): @@ -65,7 +69,7 @@ def run(self): rscript = os.path.abspath( os.path.join( basedir, - '../../' + '../' 'scripts/pipeline.R' )) print(colored("executing Rscript with: {}".format(rscript), "yellow")) @@ -73,7 +77,7 @@ def run(self): if not self.config.dry_run: with open(os.devnull, 'w') as shutup: - assert os.path.exists(rscript) + assert os.path.exists(rscript), rscript subprocess.check_call( [ 'Rscript', rscript, @@ -86,8 +90,8 @@ def run(self): str(sharemin) ], shell=False, - # stdout=sys.stdout, stderr=sys.stdout, - stdout=shutup, stderr=shutup, + stdout=sys.stdout, stderr=sys.stdout, + # stdout=shutup, stderr=shutup, ) diff --git a/scripts/pipeline.R b/sgains/scripts/pipeline.R similarity index 75% rename from scripts/pipeline.R rename to sgains/scripts/pipeline.R index cfb71a2..e4e6cdc 100644 --- a/scripts/pipeline.R +++ b/sgains/scripts/pipeline.R @@ -1,10 +1,10 @@ library("SCclust") -library("futile.logger") +# library("futile.logger") options(echo=TRUE) -flog.threshold(DEBUG) -flog.info("running sgains scclust pipeline script") +# flog.threshold(DEBUG) +# flog.info("running sgains scclust pipeline script") args <- commandArgs(trailingOnly = TRUE) @@ -23,7 +23,7 @@ nsim <- as.integer(args[7]) sharemin <- as.double(args[8]) -flog.debug("varbin_dir:", varbin_dir) +# flog.debug("varbin_dir:", varbin_dir) sgains_pipeline( scgv_dir, case_name,