One row per file and participant, from id_provenance. A file derived
from several participants (pooled samples, about 1.6 percent of files in
r7) has one row for each, so filtering this table by
HTAN_Participant_ID finds every file a participant contributed to.
Join it to htan_files() with dplyr::semi_join() to select files, or
count over it to summarise files per participant.
Usage
htan_file_participants(con = htan_con())Arguments
- con
A connection from
htan_con().
Value
A lazy tbl_duckdb_connection with columns HTAN_Data_File_ID
and HTAN_Participant_ID, one row per pair.
Examples
fixture <- system.file("extdata", "snapshot", package = "HTAN")
con <- htan_con("r7", base_url = fixture)
hta12_15 <- htan_file_participants(con) |>
dplyr::filter(HTAN_Participant_ID == "HTA12_15")
htan_files(con) |>
dplyr::semi_join(hta12_15, by = "HTAN_Data_File_ID")
#> # A query: ?? x 18
#> # Database: DuckDB 1.5.6 [unknown@Linux 7.0.0-1019-azure:R 4.6.1/:memory:]
#> table HTAN_Data_File_ID Filename File_Format File_Size md5 Component
#> <chr> <chr> <chr> <chr> <dbl> <chr> <chr>
#> 1 imaging_lev… HTA12_15_1103 imc_lev… OME-TIFF 5.62e 7 78a0… ImagingL…
#> 2 bulkWES_lev… HTA12_15_1001 whole_e… fastq 2.61e 9 420f… BulkWESL…
#> 3 bulkWES_lev… HTA12_15_1023 whole_e… fastq 2.33e 9 1cb0… BulkWESL…
#> 4 bulkWES_lev… HTA12_15_1024 whole_e… fastq 2.34e 9 5c75… BulkWESL…
#> 5 bulkWES_lev… HTA12_15_1008 whole_e… fastq 2.97e 9 e6fa… BulkWESL…
#> 6 scRNAseq_le… HTA12_15_1005 sc_RNAs… fastq 1.29e10 a931… ScRNA-se…
#> 7 imaging_lev… HTA12_15_1108 h_and_e… svs 1.05e 8 0de0… ImagingL…
#> 8 scRNAseq_le… HTA12_15_3010 sc_RNAs… gzip 2.09e 7 b957… ScRNA-se…
#> 9 scRNAseq_le… HTA12_15_2001 sc_RNAs… bam 3.55e10 ff48… ScRNA-se…
#> 10 bulkWES_lev… HTA12_15_1025 whole_e… fastq 1.19e 9 9385… BulkWESL…
#> # ℹ more rows
#> # ℹ 11 more variables: entityId <chr>, HTAN_Center <chr>, Data_Release <chr>,
#> # assay <chr>, level <int>, extension <chr>, HTAN_Participant_ID <chr>,
#> # HTAN_Assayed_Biospecimen_ID <chr>, n_participants <dbl>, drs_uri <chr>,
#> # access <chr>