scmags.ScMags.filter_genes

ScMags.filter_genes(in_cls_thres=None, im_exp=10, nof_sel=10, log_norm=True)[source]

It filters out genes that cannot be cluster-specific markers for each cluster for computational efficiency. In this way, in the next step, calculations are made for a specific gene community for each cluster.

Parameters
  • in_cls_thres (Optional[float]) – Minimum expression threshold within the cluster. If it is not given, it is computed automatically from the boxplot values.

  • im_exp (Optional[int]) – The importance of expression rates in clusters outside the filtered cluster when performing gene filtering for any cluster. If it is increased, the expression rates in clusters other than the filtered cluster will decrease.

  • nof_sel (Optional[int]) – The number of genes remained for each cluster after filtering. Marker selection will be made on these genes.

  • log_norm (bool) – Log normalization status.

Example

>>> import scmags as mg
Li dataset
>>> li = mg.datasets.li()
Filtering out unnecessary genes
>>> li.filter_genes()

After filtering genes you can see;

  • Remaining genes,

  • Scores of the remaining genes,

  • Threshold values determined for each cluster

>>> rem_genes = li.get_filter_genes()
>>> gen_scores = li.get_filter_gene_scores()
>>> li.get_filt_cluster_thresholds