Skip to main content

CStreet is a python script (python 3.6 or higher) for cell states trajectory construction by using k-nearest neighbors graph algorithm for time-series single-cell RNA-seq data.

Project description

CStreet Overview

CStreet is a python script (python 3.6 or higher) for cell states trajectory construction by using k-nearest neighbors graph algorithm for time-series single-cell RNA-seq data. It is a developmental version.

Installation

  1. Prepare required packages CStreet depends on a number of python3 packages available on pypi and all dependencies can be installed using pip3 commands :

    $ pip3 install scanpy
    $ pip3 install anndata
    $ pip3 install networkx
    $ pip3 install fa2
    $ pip3 install retrying
    
  2. Download CStreet from github CStreet can be download using git command:

    $ cd /PATH/ # here you can replace "/PATH/" with any location you want
    $ git clone git://github.com/TongjiZhanglab/CStreet.git
    
  3. Import the main class

    import sys
    sys.path.append("/PATH/CStreet/") # here you should replace "/PATH/" with the location where CStreet has been installed at
    from cstreet import *
    

Quick Start

Input file: Only expression matrix containing the time-series expression level as reads counts or normalized values for this developmental version.

Output file: An inferenced cell states trajectory.

  1. Add new time-series single cell RNA-seq data.

    import numpy as np
    import pandas as pd
    # Read single cell data as DataFrame
    data_t1=pd.read_table('data_t1.txt',header=0, sep="\t",index_col=0) 
    data_t1=pd.read_table('data_t2.txt',header=0, sep="\t",index_col=0)
    data_t2=pd.read_table('data_t3.txt',header=0, sep="\t",index_col=0)
    data_t3=pd.read_table('data_t4.txt',header=0, sep="\t",index_col=0)
    # Create a new CStreet object
    cdata=CStreetData()
    # add data into CStreet object
    cdata.add_new_timepoint_scdata(data_t1)
    cdata.add_new_timepoint_scdata(data_t2)
    cdata.add_new_timepoint_scdata(data_t3)
    
  2. Customize parameters.

    #Step1:cell_cluster
    cdata.params.cell_cluster_pca_n=10
    cdata.params.cell_cluster_knn_n=15
    cdata.params.cell_cluster_resolution=0.1
    
    #Step2:gene and cell filter
    cdata.params.filter_dead_cell=True
    cdata.params.percent_mito_cutoff=0.2
    cdata.params.filter_lowcell_gene=True
    cdata.params.min_cells=3
    cdata.params.filter_lowgene_cells=True
    cdata.params.min_genes=200
    
    #Step3:normalize
    cdata.params.normalize=True
    cdata.params.normalize_base=10000
    cdata.params.log_transform=True
    
    #Step4:get HVG
    cdata.params.highly_variable_genes=False
    
    #Step5:get_graph
    cdata.params.inner_graph_pca_n=10
    cdata.params.inner_graph_knn_n=15
    cdata.params.link_graph_pca_n=10
    cdata.params.link_graph_knn_n=15
    cdata.params.max_outgoing=10
    cdata.params.min_score=0.1
    cdata.params.min_cell_number=50
    
  3. Run CStreet

    cdata.run_cstreet()
    

Result

An example of inferenced cell trajectory:

results.png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cstreet-0.0.1.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file cstreet-0.0.1.tar.gz.

File metadata

  • Download URL: cstreet-0.0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.1 CPython/3.6.8

File hashes

Hashes for cstreet-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0df2d9eeb4570322cd966445657206adba73f410e36777f98f49cde4b4d67c17
MD5 44609fcd2cd4b2fa8ea6e10f3c3760e7
BLAKE2b-256 e6c755a71d6ec1953c342837c4ce1eb36e367737f39c5bd9ee3cb807d28b50a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page