Skip to content

an example of building up a targets analysis for -omics data

Notifications You must be signed in to change notification settings

rmflight/example_targets_workflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

tflow::use_tflow()
✔ Setting active project to '/home/rmflight/Projects/personal/example_targets_workflow'Creating 'R/'Writing 'packages.R'Writing '_targets.R'Writing '.env'

Add Data

Put the data files in there.

dir("data")
[1] "sample_measurements.csv" "sample_metadata.csv"

First tar_make()

> tar_make()
• start target measurement_filebuilt target measurement_filestart target metadata_filebuilt target metadata_fileend pipeline: 0.06 seconds

Second tar_make()

tar_make()
✔ skip target measurement_fileskip target metadata_filestart target lipid_measurements
Rows: 1012 Columns: 16
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr  (4): class, name, group_units, feature_id
dbl (12): WT_1, WT_2, WT_3, WT_4, WT_5, WT_6, KO_1, KO_2, KO_3, KO_4, KO_5, ...Use `spec()` to retrieve the full column specification for this data.Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 12 Columns: 18
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (10): parent_sample_name, assay, cell_line, client_matrix, client_sample...
dbl  (8): client_identifier, client_sample_number, group_number, sample_amou...built target lipid_measurementsstart target lipid_metadata
\
ℹ Use `spec()` to retrieve the full column specification for this data.Specify the column types or set `show_col_types = FALSE` to quiet this message.built target lipid_metadataend pipeline: 0.456 seconds

Adding EDA

> tar_make()
✔ skip target measurement_fileskip target metadata_fileskip target lipid_measurementsskip target lipid_metadatastart target explorationbuilt target explorationend pipeline: 2.606 second

Adding Normalization, Imputation, Differential Testing

> tar_make()
✔ skip target measurement_fileskip target metadata_fileskip target lipid_measurementsskip target lipid_metadatastart target lipid_normalizedbuilt target lipid_normalizedskip target explorationstart target lipid_imputedbuilt target lipid_imputedstart target lipids_differentialbuilt target lipids_differentialend pipeline: 0.118 seconds

And Differential Report

> tar_make()
✔ skip target measurement_fileskip target metadata_filestart target differential_reportbuilt target differential_reportskip target lipid_measurementsskip target lipid_metadataskip target lipid_normalizedskip target explorationskip target lipid_imputedskip target lipids_differentialend pipeline: 0.63 seconds

To Have EDA Always Re-Render First

If you wanted to always make sure that the EDA full report got rendered first, then you can add it to the tar_load call at the top of the differential_report.Rmd.

tar_load(c(exploration,
           exploration_child, 
           lipids_differential))

This makes it part of the dependency graph for the differential_report.

target object network

About

an example of building up a targets analysis for -omics data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages