Single cell analysis package
|
Classes | |
class | settings |
this class reads settings of the run and keeps them in its attributes if settings file in incorrect, the init method prints error and terminates application More... | |
Functions | |
def | read_expression (expression_file, settings, min_expression=0.1, min_cells=10, log_transform=True) |
function takes expression file and settings object and returns: More... | |
def | run_PCA (expression_table, annotation, n_components) |
runs PCA and returns: More... | |
def | get_isoforms_correlated_with_pc (expression_table, pc, n, filename) |
save genes correlated with a PC to file More... | |
def | annotate_df (row, df, min_dist, ax) |
create annotation label for a point on axis if it's far enough from other points used internally by plotting functions More... | |
def | plot_2d_pca_multiplot (transformed_expression, annotation, pca, settings) |
create plot of 6 PC combinations PC1 vs PC2, PC3 vs PC4 etc. More... | |
def | plot_2d_pca_single_plot (transformed_expression, annotation, pca, settings) |
plot cells of defined pair of PCs arguments are: More... | |
def | plot_3d_pca (transformed_expression, annotation, settings, height=1080, width=1600) |
create 3d PCA plot using plotly library arguments are: More... | |
def | plot_hierarchycal_clusterings (transformed_expression, annotation, settings) |
plot hierarchycal clustering arguments are: More... | |
def | rotate_expression (transformed_expression, x, y, angle) |
rotate transformed expression matrix by defined angle used internally in order to define pseudotime arguments are: More... | |
def | find_pseudotime (transformed_expression, annotation, pca, settings) |
function More... | |
def | plot_gene_with_pseudotime (exp, pseudotime, transcript_id) |
plots gene expression over pseudotime arguments are: More... | |
def | main () |
main function when run separately, program expects following arguments: More... | |
Variables | |
list | run_modes = ["find_day_correlated_pcs", "2d-pca-multiplot", "2d-pca-single", "3d-pca", "hierarchy", "pseudotime"] |
what modes can be script run in More... | |
list | accepted_sets_with_parameter = ["color", "outline-color", "size", "name", "shape", "superimpose", "superimpose-for-spearman"] |
sets with parameter look like: operation set_name parameter for ex. More... | |
list | accepted_sets_without_parameter = ["remove"] |
sets without parameter look like: operation set_name for ex. More... | |
list | accepted_parameters = ["number_of_genes"] |
parameters supposed to be set once More... | |
def sc-analyses.annotate_df | ( | row, | |
df, | |||
min_dist, | |||
ax | |||
) |
create annotation label for a point on axis if it's far enough from other points used internally by plotting functions
def sc-analyses.find_pseudotime | ( | transformed_expression, | |
annotation, | |||
pca, | |||
settings | |||
) |
function
returns: pseudotime for each cell, defined as linear combination of PCs, having best time correlation
arguments are:
def sc-analyses.get_isoforms_correlated_with_pc | ( | expression_table, | |
pc, | |||
n, | |||
filename | |||
) |
save genes correlated with a PC to file
def sc-analyses.main | ( | ) |
main function when run separately, program expects following arguments:
def sc-analyses.plot_2d_pca_multiplot | ( | transformed_expression, | |
annotation, | |||
pca, | |||
settings | |||
) |
create plot of 6 PC combinations PC1 vs PC2, PC3 vs PC4 etc.
arguments are:
def sc-analyses.plot_2d_pca_single_plot | ( | transformed_expression, | |
annotation, | |||
pca, | |||
settings | |||
) |
plot cells of defined pair of PCs arguments are:
def sc-analyses.plot_3d_pca | ( | transformed_expression, | |
annotation, | |||
settings, | |||
height = 1080 , |
|||
width = 1600 |
|||
) |
create 3d PCA plot using plotly library arguments are:
def sc-analyses.plot_gene_with_pseudotime | ( | exp, | |
pseudotime, | |||
transcript_id | |||
) |
plots gene expression over pseudotime arguments are:
def sc-analyses.plot_hierarchycal_clusterings | ( | transformed_expression, | |
annotation, | |||
settings | |||
) |
plot hierarchycal clustering arguments are:
def sc-analyses.read_expression | ( | expression_file, | |
settings, | |||
min_expression = 0.1 , |
|||
min_cells = 10 , |
|||
log_transform = True |
|||
) |
function takes expression file and settings object and returns:
def sc-analyses.rotate_expression | ( | transformed_expression, | |
x, | |||
y, | |||
angle | |||
) |
rotate transformed expression matrix by defined angle used internally in order to define pseudotime arguments are:
def sc-analyses.run_PCA | ( | expression_table, | |
annotation, | |||
n_components | |||
) |
runs PCA and returns:
list sc-analyses.accepted_parameters = ["number_of_genes"] |
parameters supposed to be set once
list sc-analyses.accepted_sets_with_parameter = ["color", "outline-color", "size", "name", "shape", "superimpose", "superimpose-for-spearman"] |
sets with parameter look like: operation set_name parameter for ex.
: color day_4 clue
list sc-analyses.accepted_sets_without_parameter = ["remove"] |
sets without parameter look like: operation set_name for ex.
: remove low_read_count_cells
list sc-analyses.run_modes = ["find_day_correlated_pcs", "2d-pca-multiplot", "2d-pca-single", "3d-pca", "hierarchy", "pseudotime"] |
what modes can be script run in