neuralib.atlas.ccf.dataframe.RoiSubregionDataFrame
- class neuralib.atlas.ccf.dataframe.RoiSubregionDataFrame[source]
Bases:
DataFrameWrapperRoiSubregionDataFrame with each source per row, column shows the subregions
- __init__(region, df, profile)[source]
- Parameters:
region (str) – region name
df (DataFrame) – subregion dataframe
profile (DataFrame) – profile dataframe
Methods
__init__(region, df, profile)clear([n])See polars.DataFrame.clear.
clone()Clone the wrapper.
dataframe([dataframe, may_inplace])RoiSubregionDataFrame (VIS as example).
drop(*columns[, strict])See polars.DataFrame.drop.
drop_nulls(subset)See polars.DataFrame.drop_nulls.
fill_nan([value])See polars.DataFrame.fill_nan.
fill_null([value, strategy, limit])See polars.DataFrame.fill_null.
filter(*predicates, **constraints)See polars.DataFrame.filter.
filter out overlap source
group_by(*by[, maintain_order])See polars.DataFrame.group_by.
head([n])See polars.DataFrame.head.
join(other, on[, how, left_on, right_on, ...])See polars.DataFrame.join.
lazy()Wrap dataframe in a lazy wrapper.
limit([n])See polars.DataFrame.limit.
partition_by(by, *more_by[, as_dict])See polars.DataFrame.partition_by.
pipe(function, *args, **kwargs)See polars.DataFrame.pipe.
rename(mapping)See polars.DataFrame.rename.
select(*exprs, **named_exprs)See polars.DataFrame.select.
slice(offset[, length])See polars.DataFrame.slice.
sort(by, *more_by[, descending, nulls_last, ...])See polars.DataFrame.sort.
tail([n])See polars.DataFrame.tail.
to_dict([as_series])to subregion:value dict
to_numpy()to value array.
with_animal_column(animal)with animal id column
with_columns(*exprs, **named_exprs)See polars.DataFrame.with_columns.
with_row_index([name, offset])See polars.DataFrame.with_row_index.
Attributes
columnsSee polars.DataFrame.columns.
number of subregion
with channel-wise profile.
region name
schemaSee polars.DataFrame.schema.
list of source names
list of subregion names
- __init__(region, df, profile)[source]
- Parameters:
region (str) – region name
df (DataFrame) – subregion dataframe
profile (DataFrame) – profile dataframe
- dataframe(dataframe=None, may_inplace=True)[source]
RoiSubregionDataFrame (VIS as example):
┌─────────┬───────────┬───────────┬───────────┬───┬──────────┬──────────┬──────────┬──────────┐ │ source ┆ VISam ┆ VISp ┆ VISpm ┆ … ┆ VISal ┆ VISpor ┆ VISli ┆ VISpl │ │ --- ┆ --- ┆ --- ┆ --- ┆ ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ f64 ┆ f64 ┆ f64 ┆ ┆ f64 ┆ f64 ┆ f64 ┆ f64 │ ╞═════════╪═══════════╪═══════════╪═══════════╪═══╪══════════╪══════════╪══════════╪══════════╡ │ overlap ┆ 39.649682 ┆ 15.127389 ┆ 28.025478 ┆ … ┆ 3.025478 ┆ 2.707006 ┆ 1.592357 ┆ 0.159236 │ │ aRSC ┆ 32.160414 ┆ 28.952135 ┆ 23.05304 ┆ … ┆ 6.080207 ┆ 1.293661 ┆ 2.069858 ┆ 0.07762 │ │ pRSC ┆ 25.947955 ┆ 27.95539 ┆ 27.459727 ┆ … ┆ 3.122677 ┆ 2.973978 ┆ 1.982652 ┆ 1.016109 │ └─────────┴───────────┴───────────┴───────────┴───┴──────────┴──────────┴──────────┴──────────┘
- Parameters:
dataframe (DataFrame | None)
may_inplace (bool)
- Return type:
DataFrame | RoiSubregionDataFrame
- property region: str
region name
- property subregion: list[str]
list of subregion names
- property n_subregion: int
number of subregion
- property profile: DataFrame
with channel-wise profile:
┌─────────┬────────┬───────┬────────────────┐ │ source ┆ counts ┆ total ┆ total_fraction │ │ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ u32 ┆ u32 ┆ f64 │ ╞═════════╪════════╪═══════╪════════════════╡ │ overlap ┆ 628 ┆ 4027 ┆ 0.155947 │ │ aRSC ┆ 3865 ┆ 30609 ┆ 0.12627 │ │ pRSC ┆ 4035 ┆ 14442 ┆ 0.279393 │ └─────────┴────────┴───────┴────────────────┘
- property sources: list[str]
list of source names