sourceDataFrame: SPATAData source data.frame

sourceDataFrameR Documentation

SPATAData source data.frame

Description

Access the source data.frame which contains information about various spatial transcriptomic experiments. Use ... to subset according to dplyr::filter().

Usage

sourceDataFrame(..., .rm_na_cols = NULL)

Arguments

...

<data-masking> Expressions that return a logical value, and are defined in terms of the variables in .data. If multiple expressions are included, they are combined with the & operator. Only rows for which all conditions evaluate to TRUE are kept.

.rm_na_cols

Logical value. Decides whether columns of the output data.frame that contain only missing values are removed. Defaults to TRUE if ... contains any subset instructions. Else, defaults to FALSE. Specifying the input forces the respective behaviour.

Value

Data.frame in which each row corresponds to a spatial data set stored in a SPATA2 object. The following meta variables provide additional information.

  • sample_name: Character. Name of the sample and its unique identifier.

  • comment: Character. Additional comments about the sample.

  • donor_id: Character. Unique identifier for the donor.

  • donor_species: Character. Species of the donor.

  • grade: Character. Grade of the sample in case of histologically classified malignancies.

  • grade_sub: Character. Sub-grade of the sample.

  • histo_class: Character. Histological classification.

  • histo_class_sub: Character. Sub-classification of the histological class.

  • institution: Character. Institution where the sample was collected.

  • organ: Character. Organ from which the sample was taken.

  • organ_part: Character. Specific part of the organ from which the sample was taken.

  • pathology: Character. Pathological state of the sample.

  • platform: Character. Platform used for the experiment.

  • pub_citation: Character. Citation for the publication related to the sample.

  • pub_doi: Character. DOI of the publication related to the sample.

  • pub_journal: Character. Journal where the related publication was published.

  • pub_year: Numeric. Year of publication.

  • sex: Character. Sex of the donor. Either female or male.

  • side: Character. Side of the organ from which the sample was taken.

  • tags: Character. Tags related to the sample.

  • tissue_age: Numeric. Age of the tissue in years.

  • workgroup: Character. Workgroup or team responsible for the sample.

Furthermore, there are quality control and file-specific meta variables:

  • lm_source: Date-time. Last instance when the corresponding SPATA2 object was modified.

  • mean_counts: Numeric. Mean counts of the measurements.

  • median_counts: Numeric. Median counts of the measurements.

  • modality_gene: Logical. Indicates if the modality includes genes.

  • modality_metabolite: Logical. Indicates if the modality includes metabolites.

  • modality_protein: Logical. Indicates if the modality includes proteins.

  • n_obs: Numeric. Number of observations.

  • n_tissue_sections: Numeric. Number of tissue sections as identified by identifyTissueOutline() with default parameters.

  • obj_size: Storage size of the object.

  • obs_unit: Character. Unit of observation.

  • web_link: Character. Weblinkg with which to download the SPATA2 object.

See Also

downloadSpataObject(), downloadSpataObjects() for easy download of the filtering results.

Examples


library(SPATA2)
library(SPATAData)
library(dplyr)
library(stringr)

sdf <- sourceDataFrame()

#----- example dplyr logic to filter the source data.frame

# 1. obtain glioblastoma samples from the temporal lobe

temporal_gbms <- sourceDataFrame(histo_class == "Glioblastoma" & organ_part == "temporal")

# show results
temporal_gbms

# get sample names
temporal_gbms$sample_names

# downlaod as collection
downloadSpataObjects(sample_names = gbm_samples, folder = "spata_objects/gbm") 

# 2. obtain data from specific publications

sdf_kuppe <- 
 sourceDataFrame(str_detect(pub_citation, pattern = "^Kuppe"))
 
kuppe_samples <- sdf_kuppe$sample_name

print(kuppe_samples)  


theMILOlab/SPATAData documentation built on Aug. 27, 2024, 5:04 p.m.