Giter Site home page Giter Site logo

obone_0wd2's Introduction

Bone Package

Python workflow for boolean lab analysis.

To Do:

  • Finish Network script
  • Add heatmap
  • Add reactome
  • Add dotplot
  • Add barplot
  • Add PCA plot
  • Add 'convertmm' function (mouse gene names <- -> human gene names)

Features

  • NCBI GEO parser to build expression and survival files
  • Preprocessing to read raw tarfile

Usage

Notes:

  • The expression file and survival file must have index (expression: gene names and/or probeID, survival: GSM ID) set.
  • The survival index (GSM IDs) and expression columns (GSM IDs) must match.
import matplotlib.pyplot as plt
import bone

# create the survival and expression file with the GEO class
gse40060 = bone.GEO(accessionID="GSE40060")
gse40060_survival = gse40060.survival()  # if unspecified, first GPL is used
gse40060_expr = gse40060.expr(get_genes=True)
gse40060_expr = gse40060_expr.fillna(0)  # expr file cannot contain any NA values

# initialize bone with expression and survival file
my_bone = bone.BoNE(expr=gse40060_expr, survival=gse40060_survival)

# define variables for bone
survival_name = "c source_name_ch1"
# first group used (in this case 'endogenous') is always control
gse40060_groups = {"E": "endogenous", "O": "overexpressed"}
alz_weights = {
    -3: ["SVOP", "CACNG3", "PCYOX1L", "BEX1", "TUBB3", "NRN1", "GAP43", "RGS4"],
    1: ["BGN", "EHD2", "FCGRT", "NT5DC2", "ITGB5", "PDGFRB", "GPR4", "LAMB2"],
}
my_bone.init(
    survival_col=survival_name,
    gene_weights=alz_weights,
    groups=gse40060_groups,
)

# visualize violin plot
plt.figure(figsize=(10, 5), dpi=100)
my_bone.violin()
plt.show()

Authors

obone_0wd2's People

Contributors

oliver-helix avatar otucher avatar patchtester avatar trellixvulnteam avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.