Skip to main content

A collection of utility functions for various tasks, especially in scRNAseq analysis

Project description

This package contains 2 functions:

-make_vprint(verbose): returns a print function that only prints if verbose = True; useful for creating optional print statements in long pipelines

-is_normalized(): checks if the matrix in a specific (X / layer / obsm) layer has already been normalized for an AnnData object from scanpy (numeric check, not guaranteed to work, if further processing has been done after normalization, eg log1p)

-matrix_to_anndata(): returns an anndata object with the specified matrix (from adata.X, adata.layer or adata.obsm) as adata.X. Keeps obs annotations, tries to preserve var annotations of column identity can be guaranteed.

-execute_subprocess(): runs a python subprocess, with given inputs and outputs. Passes arguments to subprocess including a list of arbitrary python objects.

-import_cmd_args(): (used in python subprocesses) imports command line arguments received from execute_subprocess via stdin

Scanpy is not directly required by the function, but it assumes adata is an AnnData object so the function is useless without scanpy or at least AnnData installed.

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

jl_helper_functions-0.2.4.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jl_helper_functions-0.2.4-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file jl_helper_functions-0.2.4.tar.gz.

File metadata

  • Download URL: jl_helper_functions-0.2.4.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for jl_helper_functions-0.2.4.tar.gz
Algorithm Hash digest
SHA256 58821fbb42788678c79e2da9d03836052cb8e6bb1248885e856cabd588f8ab6e
MD5 c907b169d74da21d5c90a9547f43b719
BLAKE2b-256 c388bfa5b91281ebe4a504bda7fb5968b1b2d2fcfe274ce0e9a11dca9cea9d9a

See more details on using hashes here.

File details

Details for the file jl_helper_functions-0.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for jl_helper_functions-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d510bc2c25c3bdf5ee831171e55820ebfcdd49e17ebe8b1c936167f3497888f9
MD5 04f648422c8f408c5fb395c51fd0520f
BLAKE2b-256 e335a7f6366b81547bff0684c47dae6dea8af269f425fdced62cf7bb42d171b1

See more details on using hashes here.

Supported by

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