view_raw_data
Access raw data from AnnData objects by selecting an attribute (X, obs, var, etc.) and applying slicing or filters to inspect specific rows, columns, or gene subsets.
Instructions
View the raw data of an AnnData object.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | The key of the attribute value to view. Can be a single string or a list of strings for nested key retrieval (e.g., ['key1', 'key2'] to access attr_obj['key1']['key2']). | |
| path | Yes | Absolute path or URL to the AnnData file | |
| attribute | Yes | The attribute to view | |
| filter_value | No | The value(s) to filter the dataframe by. | |
| filter_column | No | The column name of the dataframe to filter by. Only applicable when the selected attribute (or attribute value) is a dataframe. Must be provided TOGETHER with filter_operator and filter_value. | |
| col_stop_index | No | The stop index for the column slice. Only applied to attributes or attribute values with a suitable type. | |
| row_stop_index | No | The stop index for the row slice. Only applied to attributes or attribute values with a suitable type. | |
| col_start_index | No | The start index for the column slice. Only applied to attributes or attribute values with a suitable type. | |
| filter_operator | No | The operator to use for the dataframe filter. | |
| row_start_index | No | The start index for the row slice. Only applied to attributes or attribute values with a suitable type. | |
| columns_or_genes | No | Column names or gene names to select. For pandas.DataFrame attributes (e.g., obs, var), these are column names. For 'X' or 'layers' attributes, these are gene names (from var_names) and are used instead of col_start_index/col_stop_index. If None, the entire attribute is considered or col_start_index/col_stop_index is used. Also accepts glob-like patterns as input, e.g. ['RE*', 'CD4*']. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | The data to view, e.g. a slice of a pandas.DataFrame or a numpy array in csv format. Other data types are converted to a plain string. | |
| error | No | Any error message | |
| data_type | No | The original type of the data | |
| full_shape | No | The full shape of the data, before slicing, if applicable, otherwise 'NA' | |
| slice_shape | No | The shape of the data after slicing, if applicable, otherwise 'NA' |