diff --git a/BoolODE/__init__.py b/BoolODE/__init__.py index 70f71a4..83bf800 100644 --- a/BoolODE/__init__.py +++ b/BoolODE/__init__.py @@ -264,7 +264,7 @@ def do_post_processing(self): for gsampPath in generatedPaths[jobid]: settings = {} invalid = False - settings['outPrefix'] = gsampPath + '/' + gsampPath.split('/')[-1] + '-ss' + settings['outPrefix'] = gsampPath + '/' + gsampPath.split(os.sep)[-1] + '-ss' settings['expr'] = Path(gsampPath\ ,'ExpressionData.csv') settings['pseudo'] = Path(gsampPath\ diff --git a/requirements.txt b/requirements.txt index 8c10eb6..d4f118f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,4 @@ tqdm==4.31.1 seaborn==0.9.0 pandas==0.24.2 scikit-learn==0.21.3 +pyyaml==6.0.1 diff --git a/scripts/runSlingshot.py b/scripts/runSlingshot.py index af628dc..624e57f 100644 --- a/scripts/runSlingshot.py +++ b/scripts/runSlingshot.py @@ -23,7 +23,7 @@ def parseArgs(args): parser = OptionParser() - parser.add_option('', '--outPrefix', type = 'str',default='', + parser.add_option('', '--outPrefix', type = 'str', default='', help='Prefix for output files.') parser.add_option('-e', '--expr', type='str', @@ -70,8 +70,10 @@ def computeSSPT(ExpDF, ptDF, nClust, outPaths, noEnd = False, perplexity = 500): ''' if nClust == 1: # Return simulation time as PseduoTime - for outPath in outPaths: - ptDF.loc[ExpDF.columns].to_csv(outPath+"/PseudoTime.csv", columns =['Time']) + ptDF.loc[ExpDF.columns].to_csv(outPaths + "/PseudoTime.csv", columns=['Time']) + # for outPath in outPaths: + # print(outPath) + # ptDF.loc[ExpDF.columns].to_csv(outPath+"/PseudoTime.csv", columns =['Time']) else: ### Compute PseudoTime ordering using slingshot @@ -212,7 +214,8 @@ def computeSSPT(ExpDF, ptDF, nClust, outPaths, noEnd = False, perplexity = 500): tn.to_csv(outPaths+"/Updated_rd.tsv", sep='\t') plt.savefig(outPaths+"/SlingshotOutput.png") - os.system("rm -rf temp/") + if sys.platform.startswith("linux"): + os.system("rm -rf temp/") def main(args): opts, args = parseArgs(args) diff --git a/slingshot-docker/Dockerfile b/slingshot-docker/Dockerfile index ca062e9..84de883 100644 --- a/slingshot-docker/Dockerfile +++ b/slingshot-docker/Dockerfile @@ -35,11 +35,11 @@ RUN apt-get install -y libssl-dev libcurl4-openssl-dev libgsl-dev\ ############## ## Install R RUN echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial-cran35/" | tee -a /etc/apt/sources.list && \ - gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 && \ - gpg -a --export E084DAB9 | apt-key add - && \ - apt-get update && \ - apt-get install -y r-recommended=${R_VERSION} && \ - apt-get install -y r-base=${R_VERSION} + gpg --keyserver keyserver.ubuntu.com --recv-key 95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7 && \ + gpg -a --export 95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7 | apt-key add - && \ + apt-get update --allow-unauthenticated && \ + apt-get install -y --allow-unauthenticated r-recommended=${R_VERSION} && \ + apt-get install -y --allow-unauthenticated r-base=${R_VERSION} RUN Rscript -e 'install.packages("BiocManager", repos = "http://cran.us.r-project.org")' ##############