From 12a7d451acfe38193af11e9a9184a7b44b18e2cd Mon Sep 17 00:00:00 2001 From: yutuyt01 Date: Fri, 24 May 2024 16:56:15 -0400 Subject: [PATCH 1/4] docker key change --- slingshot-docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slingshot-docker/Dockerfile b/slingshot-docker/Dockerfile index ca062e9..76c1da1 100644 --- a/slingshot-docker/Dockerfile +++ b/slingshot-docker/Dockerfile @@ -35,8 +35,8 @@ 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 - && \ + gpg --keyserver keyserver.ubuntu.com --recv-key 95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7 && \ + gpg -a --export 95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7 | apt-key add - && \ apt-get update && \ apt-get install -y r-recommended=${R_VERSION} && \ apt-get install -y r-base=${R_VERSION} From 5ca4716e2459a8923ea6313ee7b67fb473ab55f2 Mon Sep 17 00:00:00 2001 From: yutuyt01 Date: Tue, 28 May 2024 16:25:16 -0400 Subject: [PATCH 2/4] os.sep change for cross-os --- BoolODE/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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\ From 45a0ae5e09f8a2f2a3e341e01afa4af97f61d550 Mon Sep 17 00:00:00 2001 From: yutuyt01 Date: Thu, 30 May 2024 10:31:12 -0400 Subject: [PATCH 3/4] patchwork fix for slingshot dockerfile and changed clusters=1 to be consistent with other operation --- scripts/runSlingshot.py | 14 ++++++++++---- slingshot-docker/Dockerfile | 6 +++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/scripts/runSlingshot.py b/scripts/runSlingshot.py index af628dc..70c9eb1 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,11 @@ 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/") + elif sys.platform.startswith("win"): + print("yay") + #os.system('rmdir /S /Q "temp"') def main(args): opts, args = parseArgs(args) diff --git a/slingshot-docker/Dockerfile b/slingshot-docker/Dockerfile index 76c1da1..84de883 100644 --- a/slingshot-docker/Dockerfile +++ b/slingshot-docker/Dockerfile @@ -37,9 +37,9 @@ RUN apt-get install -y libssl-dev libcurl4-openssl-dev libgsl-dev\ 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 95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7 && \ gpg -a --export 95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7 | apt-key add - && \ - apt-get update && \ - apt-get install -y r-recommended=${R_VERSION} && \ - apt-get install -y r-base=${R_VERSION} + 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")' ############## From f95b9d1c249484322f10035ddf730f4476cdf309 Mon Sep 17 00:00:00 2001 From: yutuyt01 Date: Tue, 11 Jun 2024 17:15:52 +0000 Subject: [PATCH 4/4] included pyyaml in requirements as it was not present previously quick fix on removing temp files --- requirements.txt | 1 + scripts/runSlingshot.py | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) 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 70c9eb1..624e57f 100644 --- a/scripts/runSlingshot.py +++ b/scripts/runSlingshot.py @@ -216,9 +216,6 @@ def computeSSPT(ExpDF, ptDF, nClust, outPaths, noEnd = False, perplexity = 500): plt.savefig(outPaths+"/SlingshotOutput.png") if sys.platform.startswith("linux"): os.system("rm -rf temp/") - elif sys.platform.startswith("win"): - print("yay") - #os.system('rmdir /S /Q "temp"') def main(args): opts, args = parseArgs(args)