scSemiProfiler.inference.tgtinfer¶
-
scSemiProfiler.inference.tgtinfer(name, representative, target, bulktype='pseudobulk', lambdad=4.0, pretrain1batch=128, pretrain1lr=0.001, pretrain1vae=100, pretrain1gan=100, lambdabulkr=1, pretrain2lr=0.0001, pretrain2vae=50, pretrain2gan=50, inferepochs=150, lambdabulkt=8.0, inferlr=0.0002, pseudocount=0.1, k=15, device='cuda:0')[source]¶ Computationally infer the single-cell data of a single non-representative target sample based on a representatives’ single-cell data and bulk data of both samples.
- Parameters
name (
str) – The project name.representative (
typing.Union[str,int]) – The representative. Either indicated using sample ID (str) or the i-th (int) sample.target (
typing.Union[str,int]) – The target sample. Either indicated using sample ID (str) or the i-th (int) sample.bulktype (
str) – Pseudobulk or real bulk datalambdad (
float) – Scaling factor for the discriminator loss.pretrain1batch (
int) – The mini-batch size during the first pretrain stage.pretrain1lr (
float) – The learning rate used in the first pretrain stage.pretrain1vae (
int) – The number of epochs for training the VAE during the first pretrain stage.pretrain1gan (
int) – The number of iterations for training GAN during the first pretrain stage.lambdabulkr (
float) – Scaling factor for represenatative bulk loss for pretrain 2.pretrain2lr (
float) – Pretrain 2 learning rate.pretrain2vae (
int) – The number of epochs for training the VAE during the second pretrain stage.pretrain2gan (
int) – The number of iterations for training the GAN during the second pretrain stage.inferepochs (
int) – The number of epochs used for each mini-stage during inference.lambdabulkt (
float) – Scaling factor for the initial target bulk loss.inferlr (
float) – Infer stage learning rate.k (
int) – The number of nearest neighbors used in cell graph.device (
str) – Which device to use, e.g. ‘cpu’, ‘cuda:0’.pseudocount (
float) – Pseudocount used when converting real bulk to pseudobulk space
- Return type
- Returns
None
Example
>>> name = 'project_name' >>> scSemiProfiler.tgtinfer(name = name, representatives = 6, target = 7, bulktype = 'real')