Skip to content

Running Mixture Package

Matias Samuel Miranda edited this page Oct 25, 2019 · 1 revision

In the repository there is a program that run Mixture. NewManFl.py. Execute in the terminal the following command and you should see running the program.

python3 NewManFl.py

Or create .py script and paste thw following code and run the script.

This example tends to estimate the same pure cell-types from LM22 signature matrix from Newman et al.

import pandas as pd
import Mixture
import Mixture.Utils as mut

# Load Data Signature
# LM22 OR TIL10
X = mut.loadSignature('LM22')

# Read xlsx expression file
Y = pd.read_excel('data/NewmanFL.xlsx', sheet_name = 0) 

# Number of cores that will work
cores = 4

# Number of permutation samples
iters = 500

# Name the output file xlsx (without format)
output = 'Result_Newman'

# Run Mixer Function
if __name__ == '__main__':
    result, pValues = Mixture.Mixture(X, Y , cores, iters, output)

image