Skip to content

Commit

Permalink
Copied data import chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviaAB committed Jan 16, 2024
1 parent d1f8463 commit f9ef3e5
Show file tree
Hide file tree
Showing 16 changed files with 1,926 additions and 194 deletions.
1 change: 1 addition & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ book:
- part: "Data preparation"
chapters:
- data_import.qmd
- inspecting_multidataset.qmd
- references.qmd

bibliography: references.bib
Expand Down
67 changes: 67 additions & 0 deletions _targets.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,73 @@ list(
col_ids = c("marker", "gene_id", "sample_id"),
features_as_rowss = c(TRUE, TRUE, FALSE),
target_name_suffixes = c("geno", "transcripto", "metabo")
),

## Features metadata import
tar_target(
fmetadata_file_geno,
system.file("extdata/genomics_features_info.csv", package = "moiraine"),
format = "file"
),

tar_target(
fmetadata_geno,
import_fmetadata_csv(
fmetadata_file_geno,
col_id = "marker",
col_types = c("chromosome" = "c")
)
),

import_fmetadata_csv_factory(
files = c(
system.file("extdata/metabolomics_features_info.csv", package = "moiraine")
),
col_ids = c("feature_id"),
target_name_suffixes = c("metabo")
),

import_fmetadata_gff_factory(
files = system.file("extdata/bos_taurus_gene_model.gff3", package = "moiraine"),
feature_types = "genes",
add_fieldss = c("Name", "description"),
target_name_suffixes = "transcripto"
),

## Samples metadata import
import_smetadata_csv_factory(
files = system.file("extdata/samples_info.csv", package = "moiraine"),
col_ids = "animal_id",
target_name_suffixes = "all"
),

## Creating omics sets for each dataset
create_omics_set_factory(
datasets = c(data_geno, data_transcripto, data_metabo),
omics_types = c("genomics", "transcriptomics", "metabolomics"),
features_metadatas = c(fmetadata_geno, fmetadata_transcripto, fmetadata_metabo),
samples_metadatas = c(smetadata_all, smetadata_all, smetadata_all)
),

## Creating the MultiDataSet object
tar_target(
mo_set,
create_multiomics_set(
list(set_geno,
set_transcripto,
set_metabo)
)
),

## Example with names
tar_target(
mo_set_with_names,
create_multiomics_set(
list(set_geno,
set_transcripto,
set_metabo),
datasets_names = c("CaptureSeq", "RNAseq", "LCMS")
)
)

)
19 changes: 16 additions & 3 deletions _targets/meta/meta
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@ name|type|data|command|depend|seed|path|time|size|bytes|format|repository|iterat
data_geno|stem|6c35052b46564eaa|2f6d6fac438e0c68|8846e09db8d257d5|-676849289||t19737.0760777314s|c999686471cd2bf1|1616600|rds|local|vector|||1.47||
data_metabo|stem|d373e47b182755db|91ad6cfa4064ca3b|a8b88e2a622ece40|-1296975954||t19737.0760063898s|6044e0195a090f92|19248|rds|local|vector|||1.715||
data_transcripto|stem|3f48590934bb1333|5d10bc167155482a|69f2986da2408dad|196911606||t19737.076051425s|a0d23620354f1de9|6494110|rds|local|vector|||1.74||
dataset_file_geno|stem|af97a53623d6e7de|1268a5820b487f6c|ef46db3751d8e999|1960638429|/home/hrpoab/R/x86_64-pc-linux-gnu-library/4.2/moiraine/extdata/genomics_dataset.csv|t19737.0751429907s|20566495b664ffb4|6850822|file|local|vector|||0||
dataset_file_metabo|stem|175ac2cf6405fbad|3f7f2365183f9943|ef46db3751d8e999|1190506623|/home/hrpoab/R/x86_64-pc-linux-gnu-library/4.2/moiraine/extdata/metabolomics_dataset.csv|t19737.0751431532s|c4e0ec1268286261|35815|file|local|vector|||0||
dataset_file_transcripto|stem|71a95dd921de2179|55d2b8e9ea46b8a5|ef46db3751d8e999|-658525691|/home/hrpoab/R/x86_64-pc-linux-gnu-library/4.2/moiraine/extdata/transcriptomics_dataset.csv|t19737.0751437994s|92b17bfefe92cde3|10702704|file|local|vector|||0.001||
dataset_file_geno|stem|af97a53623d6e7de|16d0dc13d14d425e|ef46db3751d8e999|1960638429|/powerplant/workspace/hrpoab/RENV_CACHE/v5/R-4.2/x86_64-pc-linux-gnu/moiraine/0.0.0.9000/a0cb1ab1c9bfde027266aa5d81f33617/moiraine/extdata/genomics_dataset.csv|t19737.0751429907s|20566495b664ffb4|6850822|file|local|vector|||0||
dataset_file_metabo|stem|175ac2cf6405fbad|028486e18a9eaf32|ef46db3751d8e999|1190506623|/powerplant/workspace/hrpoab/RENV_CACHE/v5/R-4.2/x86_64-pc-linux-gnu/moiraine/0.0.0.9000/a0cb1ab1c9bfde027266aa5d81f33617/moiraine/extdata/metabolomics_dataset.csv|t19737.0751431532s|c4e0ec1268286261|35815|file|local|vector|||0.001||
dataset_file_transcripto|stem|71a95dd921de2179|2efdf7f6437fd436|ef46db3751d8e999|-658525691|/powerplant/workspace/hrpoab/RENV_CACHE/v5/R-4.2/x86_64-pc-linux-gnu/moiraine/0.0.0.9000/a0cb1ab1c9bfde027266aa5d81f33617/moiraine/extdata/transcriptomics_dataset.csv|t19737.0751437994s|92b17bfefe92cde3|10702704|file|local|vector|||0.001||
fmetadata_file_geno|stem|0d4f9d1abe758d58|8ac42325af16f9cc|0fce92a88a7882f5|987449262|/powerplant/workspace/hrpoab/RENV_CACHE/v5/R-4.2/x86_64-pc-linux-gnu/moiraine/0.0.0.9000/a0cb1ab1c9bfde027266aa5d81f33617/moiraine/extdata/genomics_features_info.csv|t19737.0751431053s|e86eccc6c1038d8e|1462543|file|local|vector|||0.007||
fmetadata_file_metabo|stem|ce74bd2201a2d6ed|7e9dc3dea665d30c|ef46db3751d8e999|-1426493726|/powerplant/workspace/hrpoab/RENV_CACHE/v5/R-4.2/x86_64-pc-linux-gnu/moiraine/0.0.0.9000/a0cb1ab1c9bfde027266aa5d81f33617/moiraine/extdata/metabolomics_features_info.csv|t19737.075143176s|9cb4cce6003c5d85|13765|file|local|vector|||0.001||
fmetadata_file_transcripto|stem|5b0c736c6e2b1870|e71ad6fb7cfdab48|ef46db3751d8e999|1741435395|/powerplant/workspace/hrpoab/RENV_CACHE/v5/R-4.2/x86_64-pc-linux-gnu/moiraine/0.0.0.9000/a0cb1ab1c9bfde027266aa5d81f33617/moiraine/extdata/bos_taurus_gene_model.gff3|t19737.0751425266s|3c1bc2cfc685286e|47182268|file|local|vector|||0||
fmetadata_geno|stem|6e05fc065a44eb05|6063db1a29e2c1f0|adbbfaf18ae42144|1845751809||t19737.9062294664s|7228e160b348b511|410111|rds|local|vector|||0.222||
fmetadata_metabo|stem|2fa264d9731315ae|6530e474805c7677|40a14803581cc40c|-1710108544||t19737.9062248138s|ebd621d71b90c5fd|5459|rds|local|vector|||0.879||
fmetadata_transcripto|stem|452e3b635689568a|588e73874bd5990b|af559c33c19b2822|650025152||t19737.9129876928s|90da4f7e51eb50af|869252|rds|local|vector|||17.12||
mo_set|stem|1d4d54ce13ecca5d|3230a4751cf4b45d|9b77a47f05b21c4c|-1876565291||t19738.0556140068s|8b6cf5ea29453dd2|36753599|rds|local|vector|||0.117||
mo_set_with_names|stem|e64ebcd89ddb70bd|b88cddcfa5d2a267|6eebd2f68cb73320|-1640374052||t19738.0568285842s|593ace30823e21f2|36753195|rds|local|vector|||0.114||
set_geno|stem|b9a63471a2bae355|6d0f65ce2b5dfcc3|53cc5826dcb4a6d2|1285324786||t19738.0475523002s|19e8c5270d1eb961|2173155|rds|local|vector|||1.075|5 samples in samples metadata not in dataset, will be removed from metadata.|
set_metabo|stem|0d94569ea56d374d|c474bc703c42933a|608f12a275630935|1932753424||t19738.0474809317s|ed98fcecc594d702|29765|rds|local|vector|||0.06|5 samples in samples metadata not in dataset, will be removed from metadata.|
set_transcripto|stem|a34ee2565470dabc|ab4282af2718b58e|4a163e482e11d826|1396440415||t19738.0475239992s|5602925ca953b1da|7190802|rds|local|vector|||0.972|7272 features in feature metadata not in dataset, will be removed from metadata.. 1 samples in samples metadata not in dataset, will be removed from metadata.|
smetadata_all|stem|ab53a5d6797cc718|6b4aea71b616cb74|a19772ceb5ec11de|-937728991||t19737.9793081304s|f1652d5360365c83|4520|rds|local|vector|||0.784||
smetadata_file_all|stem|334b548c7e00bff1|c580ee2a2c849cea|ef46db3751d8e999|1816987930|/powerplant/workspace/hrpoab/RENV_CACHE/v5/R-4.2/x86_64-pc-linux-gnu/moiraine/0.0.0.9000/a0cb1ab1c9bfde027266aa5d81f33617/moiraine/extdata/samples_info.csv|t19737.0751431987s|70b525cc81b75a3d|7970|file|local|vector|||0.001||
Loading

0 comments on commit f9ef3e5

Please sign in to comment.