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

Fixes for Slingshot Dockerfile and other various minor bugs #25

Open
wants to merge 4 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
2 changes: 1 addition & 1 deletion BoolODE/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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\
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 7 additions & 4 deletions scripts/runSlingshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions slingshot-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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")'

##############
Expand Down