join_features() extracts and joins information for specified features
# S4 method for Seurat
join_features(
.data,
features = NULL,
all = FALSE,
exclude_zeros = FALSE,
shape = "long",
...
)
A Seurat object
A vector of feature identifiers to join
If TRUE return all
If TRUE exclude zero values
Format of the returned table "long" or "wide"
Parameters to pass to join wide, i.e. assay name to extract feature abundance from and gene prefix, for shape="wide"
An object containing the information.for the specified features An object containing the information.for the specified features
This function extracts information for specified features and returns the information in either long or wide format.
data("pbmc_small")
pbmc_small %>%
join_features(features = c("HLA-DRA", "LYZ"))
#> tidyseurat says: This operation lead to duplicated cell names. A data frame is returned for independent data analysis.
#> # A tibble: 160 × 31
#> .cell .feature .abundance_RNA orig.ident nCount_RNA nFeature_RNA
#> <chr> <chr> <dbl> <fct> <dbl> <int>
#> 1 ATGCCAGAACGACT HLA-DRA 0 SeuratProject 70 47
#> 2 ATGCCAGAACGACT LYZ 4.97 SeuratProject 70 47
#> 3 CATGGCCTGTGCAT HLA-DRA 4.78 SeuratProject 85 52
#> 4 CATGGCCTGTGCAT LYZ 4.78 SeuratProject 85 52
#> 5 GAACCTGATGAACC HLA-DRA 0 SeuratProject 87 50
#> 6 GAACCTGATGAACC LYZ 4.75 SeuratProject 87 50
#> 7 TGACTGGATTCTCA HLA-DRA 0 SeuratProject 127 56
#> 8 TGACTGGATTCTCA LYZ 0 SeuratProject 127 56
#> 9 AGTCAGACTGCACA HLA-DRA 4.07 SeuratProject 173 53
#> 10 AGTCAGACTGCACA LYZ 0 SeuratProject 173 53
#> # … with 150 more rows, and 25 more variables: RNA_snn_res.0.8 <fct>,
#> # letter.idents <fct>, groups <chr>, RNA_snn_res.1 <fct>, PC_1 <dbl>,
#> # PC_2 <dbl>, PC_3 <dbl>, PC_4 <dbl>, PC_5 <dbl>, PC_6 <dbl>, PC_7 <dbl>,
#> # PC_8 <dbl>, PC_9 <dbl>, PC_10 <dbl>, PC_11 <dbl>, PC_12 <dbl>, PC_13 <dbl>,
#> # PC_14 <dbl>, PC_15 <dbl>, PC_16 <dbl>, PC_17 <dbl>, PC_18 <dbl>,
#> # PC_19 <dbl>, tSNE_1 <dbl>, tSNE_2 <dbl>