Skip to content

Commit

Permalink
update demo
Browse files Browse the repository at this point in the history
  • Loading branch information
PengJia6 committed Mar 30, 2021
1 parent 12ad0c7 commit 121da32
Show file tree
Hide file tree
Showing 21 changed files with 1,251 additions and 1,321 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@

![GitHub last commit](https://img.shields.io/github/last-commit/xjtu-omics/msisensor-rna)
[![GitHub Release Date](https://img.shields.io/github/release-date/xjtu-omics/msisensor-rna)](https://github.com/xjtu-omics/msisensor-rna/releases)
[![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/xjtu-omics/msisensor-rna?include_prereleases)](https://github.com/xjtu-omics/msisensor-rna/releases)
[![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/pengjia1110/msisensor-rna)](https://hub.docker.com/repository/docker/pengjia1110/msisensor-rna)
![Docker Pulls](https://img.shields.io/docker/pulls/pengjia1110/msisensor-rna)
![GitHub all releases](https://img.shields.io/github/downloads/xjtu-omics/msisensor-rna/total?label="Github")

![PyPI](https://img.shields.io/pypi/v/msisensor-rna)



# MSIsensor-RNA
MSIsensor-RNA is a member of MSIsensor family for microsatellite instability (MSI) detection using RNA sequencing data. MSIsensor-RNA compute MSI by the expression of MSI associated genes. MSIsensor-RNA shows efficient performance in AUC, sensitivity, specificity and robustness.

Expand Down
408 changes: 0 additions & 408 deletions demo/TCGA.STAD.independent.mean.100.csv

This file was deleted.

375 changes: 0 additions & 375 deletions demo/caseinfo.TCGA.STAD.csv

This file was deleted.

408 changes: 0 additions & 408 deletions demo/input.csv

This file was deleted.

100 changes: 0 additions & 100 deletions demo/lll

This file was deleted.

Binary file removed demo/output
Binary file not shown.
612 changes: 612 additions & 0 deletions demo/test.csv

Large diffs are not rendered by default.

18 changes: 0 additions & 18 deletions demo/test.py

This file was deleted.

3 changes: 3 additions & 0 deletions demo/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
msisensor-rna train -i ./train.csv -m demo.pkl -t CRC
msisensor-rna show -m demo.pkl -g genes.list
msisensor-rna detection -i ./test.csv -m demo.pkl -o test.output.csv
612 changes: 612 additions & 0 deletions demo/train.csv

Large diffs are not rendered by default.

Binary file added model/TCGA.CRC.model.pkl
Binary file not shown.
Binary file added model/TCGA.STAD.model.pkl
Binary file not shown.
Binary file added model/TCGA.UCEC.model.pkl
Binary file not shown.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/detection.py → msisensor/detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
=============================================================================="""
import pickle
import pandas as pd
from src.units import logger
from msisensor.units import logger


def detection_msi(paras):
Expand Down
8 changes: 4 additions & 4 deletions src/msisensor.py → msisensor/msisensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
curpath = os.path.abspath(os.path.dirname(sys.argv[0]))
sys.path.append(os.path.dirname(curpath))

from src.paras import *
from src.detection import detection_msi
from src.train import train_model
from src.show import show_model
from msisensor.paras import *
from msisensor.detection import detection_msi
from msisensor.train import train_model
from msisensor.show import show_model


def main():
Expand Down
2 changes: 1 addition & 1 deletion src/paras.py → msisensor/paras.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
curpath = os.path.abspath(os.path.dirname(sys.argv[0]))
sys.path.append(os.path.dirname(curpath))
import argparse
from src.units import *
from msisensor.units import *


def args_process():
Expand Down
2 changes: 1 addition & 1 deletion src/show.py → msisensor/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import pickle

from src.units import logger
from msisensor.units import logger


def show_model(paras):
Expand Down
6 changes: 3 additions & 3 deletions src/train.py → msisensor/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from sklearn.linear_model import LogisticRegression
from imblearn.over_sampling import RandomOverSampler, SMOTE
from collections import Counter
from src.units import logger
from msisensor.units import logger


def build_classrfier(type="RandomForest"):
Expand Down Expand Up @@ -99,8 +99,8 @@ def train_model(paras):
description["Specificity"] = specificity
description["Precision"] = precision
description["Model Path"] = os.path.abspath(model_path)
description["Author"] = os.path.abspath(author)
description["Email"] = os.path.abspath(email)
description["Author"] = author
description["Email"] = email
for item, value in description.items():
logger.info(item + ": {}".format(value))
with open(model_path, 'wb') as f:
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
=============================================================================="""
from setuptools import setup

from src.units import default_general
from msisensor.units import default_general

setup(
name=default_general["name"],
Expand All @@ -25,5 +25,5 @@
install_requires=['pandas>=1.0', "numpy>=1.16",
"scikit-learn>=0.24", "imbalanced-learn>=0.8.0"],
python_requires='>=3.6',
entry_points={'console_scripts': ['msisensor-rna = src.msisensor:main']},
entry_points={'console_scripts': ['msisensor-rna = msisensor.msisensor:main']},
)

0 comments on commit 121da32

Please sign in to comment.