Metadata-Version: 2.1
Name: Sparse-Optimization-Toolbox
Version: 0.1.0
Summary: Package for Sparse optimization
Home-page: https://github.com/ljs1214/Gene-regulation-network-reasoning
Author: Lou jiashu
Author-email: loujiashu@163.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE

# An sparse opyimization toolbox contains test data generation and network reasoning

## Test Data Generation

### **Import**

```{python}
from sparsetools import matCreater
```

### **Data generation**

```{python}
matCreater.matCreater(tfLen=10, sampleNums=200, geneNums=2000, normalLoc=0, normalScale=0.1)
```
| Parameter  |      Type      |  Explanation|
|----------|:-------------:|------:|
| tfLen|  int | The numbers of transcribe factors|
| sampleNums|    int  |  The numbers of transcribe samples  |
|geneNums | int|   The numbers of target genes  |
|normalLoc | float: recommond use 0|  Mean value of Gaussian noise  |
|normalScale | float|   Variance of Gaussian noise|

### **Return:**
| Parameter  |      Type      | Shapes| Explanation|
|----------|:-------------:|------:|------:|
| W_d|  np.array | (tfLen, sampleNums)|Over complete dictionary|
| zNetwork|    np.array  | (geneNums, tfLen)| Sparse matrix  |
|xTargetGene | np.array| (geneNums,sampleNums)|  Target   |
  

## Network reasoning  

```{python}
from sparsetools import Optimization
Optimization.voting(expre, tf_names, gene_names)
```
| Parameter  |      Type      |  Explanation|
|----------|:-------------:|------:|
| expre|  np.array | The expresion matrix of genes|
|tf_names| np.array|   Names of tf |
|gene_names| np.array|  Name of all genes(including TF)  |

### **Return:**
The moderation network result matrix of the voting algorithm, while the results of the independent algorithm are named with the algorithm name and stored locally.


