Skip to main content

PanClassif: A machine learning classifier pipeline for TCGA pancancer classification

This is a complete machine learning pipeline package to work with TCGA cancer RNA-seq gene count data.

Github

Data prerequisition

Functions

featSelect(homepath, cancerpath, normalpath, k)

Params

  • homepath : (str) Path where you want to save all the generated files and folders.
  • cancerpath : (str)
    Path where all the cancer's cancer gene expression matrix are located.
  • normalpath : (str)
    Path where all the cancer's normal gene expression matrix are located.
  • k : (int) The number of top genes you want to choose per cancer. (default: k=5) you can not put k less than 5

dataProcess(homepath,names,cancerpath,smoothed_cancer,smoothed_normal,scale_mode)

Params

  • homepath : (str) Path where you want to save all the generated files and folders.
  • cancerpath : (str) Path where all the cancer's cancer gene expression matrix are located.
  • names : (list) List of the cancer names found from featSelect function.
  • smoothed_cancer : (str) Path where all the cancer's smoothed cancer gene expression matrix are located.
  • smoothed_normal : (str) Path where all the cancer's smoothed normal gene expression matrix are located.
  • scale_mode (int): Here (0 is for Standardization and 1 for normalization) for data scalling

upsampled(names, homepath)

binary_merge(names, homepath)

multi_merge(names, homepath)

Params

  • names : (list) List of the cancer names found from featSelect function.
  • homepath : (str)
    Path where you want to save all the generated files and folders.

classification(homepath, classifier, mode, save_model)

Params

  • homepath : (str) Path where you want to save all the generated files and folders
  • classifer : (sklearn's classification model) Provide the classification model's instance you want to use. For example: RandomForestClassifier(n_estimators=100).
  • Or, classifer : (str) If you want to use "Neural Network" then just type "NN". For example: classifier = "NN"
  • mode : (str) There is two mode 1) binary 2) multi. Use "binary" for binary classification & "multi" for multiclass classification. (default: mode = "binary")
  • save_model : (str) Optional parameter. Use it only if you want to save the model. For example: save_model = "your_model_name"

gsea(homepath)

  • homepath : (str) Path where you want to save all the generated files and folders

Example


homepath = '/home'
cancerpath = '/home/cancer/'
normalpath = '/home/normal/'

smoothed_cancer = '/home/smoothed_cancer'
smoothed_normal = '/home/smoothed_normal'

Data Load and Process Phase

import panclassif as pc 
#You have to follow below order to work the code properly 
names = pc.featSelect(homepath,cancerpath,normalpath, k=5)
pc.dataProcess(homepath,names,cancerpath,smoothed_cancer,smoothed_normal)
pc.upsampled(names, homepath)
pc.binary_merge(names, homepath)
pc.multi_merge(names, homepath)

Classification Phase

from sklearn.ensemble import RandomForestClassifier
pc.classification(homepath, RandomForestClassifier(n_estimators=100), mode="multi", save_model="RF")

Gene enrichment check

pc.gsea(homepath)

Metadata

Release files for panclassif 2.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for panclassif 2.1.1
File Interpreter ABI Platform
panclassif-2.1.1-py3-none-any.whl Python 3 none any Details

Release files / panclassif-2.1.1-py3-none-any.whl

Download URL panclassif-2.1.1-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f8bbddde5823741382e290447a78b3823779ce1d37f7c3014acff0faded206b
BLAKE2b-256 checksum
How to use checksums
bfcb47d57dff1ccea4b8571abb341d5e51aea2cb2b0e468ed719ebe4cdf560e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.26.0 setuptools/57.4.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.7

Release history Release notifications | RSS feed

2.1.3

1 release file

2.1.2

1 release file

This release

2.1.1 This release

1 release file

2.1.0

1 release file

2.0.20

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page