scSemiProfiler_dev.inference.scinfer¶
-
scSemiProfiler_dev.inference.scinfer(name, representatives, cluster, targetid, bulktype='real', 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, device='cuda:0')[source]¶ Computationally infer the single-cell data of all non-representative samples (target samples) based on the cohort’s bulk data and the representatives’ single-cell data
- Parameters
name (
str) – The porject name.representatives (
str) – Path to a “txt” file containing the representative sample IDs (number)cluster (
str) – Path to a “txt” file containing the cluster label informationtargetid (
str) – Deprecated parameter for debugging purposetgtpid – Sample ID (number) of the target 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.device (
str) – Which device to use, e.g. ‘cpu’, ‘cuda:0’.
Example
>>> name = 'project_name' >>> representatives = name + '/status/init_representatives.txt' >>> cluster = name + '/status/init_cluster_labels.txt' >>> scSemiProfiler.scinfer(name = name, representatives = representatives, cluster = cluster, bulktype = 'real')
- Return type