scglue.genomics.rna_anchored_guidance_graph
- scglue.genomics.rna_anchored_guidance_graph(rna, *others, gene_region='combined', promoter_len=2000, extend_range=0, extend_fn=dist_power_decay, signs=None, propagate_highly_variable=True, corrupt_rate=0.0, random_state=None)[source]
Build guidance graph anchored on RNA genes
- Parameters
rna (
AnnData
) – Anchor RNA dataset*others – Other datasets
gene_region (
str
) – Defines the genomic region of genes, must be one of{"gene_body", "promoter", "combined"}
.promoter_len (
int
) – Defines the length of gene promoters (bp upstream of TSS)extend_range (
int
) – Maximal extend distance beyond gene regionsextend_fn (
typing.Callable
[[int
],float
]) – Distance-decreasing weight function for the extended regions (by defaultdist_power_decay()
)signs (
typing.Optional
[typing.List
[int
]]) – Sign of edges between RNA genes and features in each*others
dataset, must have the same length as*others
. Signs must be one of{-1, 1}
. By default, all edges have positive signs of1
.propagate_highly_variable (
bool
) – Whether to propagate highly variable genes to other datasets, datasets in*others
would be modified in place.corrupt_rate (
float
) – CAUTION: DO NOT USE, only for evaluation purposerandom_state (
typing.Union
[RandomState
,int
,None
]) – CAUTION: DO NOT USE, only for evaluation purpose
- Return type
- Returns
graph – Prior regulatory graph
Note
In this function, features in the same dataset can only connect to anchor genes via the same edge sign. For more flexibility, please construct the guidance graph manually.