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

[info] Use with Tensorflow 2 #23

Open
ashipde opened this issue Apr 21, 2020 · 0 comments
Open

[info] Use with Tensorflow 2 #23

ashipde opened this issue Apr 21, 2020 · 0 comments

Comments

@ashipde
Copy link

ashipde commented Apr 21, 2020

This is not an Issue, just a brief on how I was able to use SAUCIE (master version as of today) with current versions of Tensorflow (2.1.0) and Numpy (1.18.1). It may be helpful to others.

System

CentOS Linux 7 with Linux 3.10.0-514.10.2.el7.x86_64
Conda 4.8.3 with Python 3.7.4

Installation of required packages using Conda

SAUCIE requires certain packages. Here, the packages are installed in the Conda environment that I will use to run SAUCIE.

conda activate base
conda create -n tensorflo fcsparser numpy pandas python tensorflow 
conda activate tensorflo
pip install -U fcswrite matplotlib scikit-learn tensorboard

Upgrade SAUCIE's Tensorflow 1 code to work with Tensorflow 2

The tf_upgrade_v2 Python script installed during Tensorflow installation (above) is used. All SAUCIE code files are processed and, with any necessary changes, are put in a new folder that the script creates.

miniconda3/envs/tensorflo/bin/tf_upgrade_v2 --intree SAUCIE/ --outtree SAUCIEnew/

Modify the new SAUCIE.py file

This is for compatibility with latest Numpy. Replace the four instances of as.matrix() with to.numpy().

Use the new SAUCIE

E.g.:

python SAUCIEnew/SAUCIE.py --format fcs --input_dir fcs --output_dir out --batch_correct --cluster

Versions of installed software in the Conda environment

fcsparser 0.2.0
fcswrite 0.5.2
matplotlob 3.2.1
numpy 1.18.1
op-einsum 3.2.1
pandas 1.0.3
pip 20.0.2
python 3.7.6
scipy 1.4.1
tensorboard 2.2.1
tensorflow 2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant