Library preparation and alignment

Detailed description of the RNASeq data generation and preprocessing can be found in the supplementary material of the paper by Zhernakova et al. (Zhernakova et al. 2017)

Feature quantification read counts

Gene read counts are generated using featurecounts.

Reference annotation used is from ensembl: release 91

Prepare sample metadata

Metadata for the samples is retrieved from the metadatabase. This is done only for the samples which were part of maximum set of unrelated individuals from Freeze2. These are the same samples as were uploaded to EGA (Fastq files: EGAD00001003785).

library(BBMRIomics)
freeze2_unrelated <- runQuery(paste0(
    "SELECT uuid, biobank as biobank_id, bios_id AS ids, gonl_id, ",
        "rna_run.rna_run_id AS run_id, age AS sampling_age, ", 
        "COALESCE(rna_sampling_date, dna_bloodsampling_date, ",
            "cellcount_bloodsampling_date, lipids_bloodsampling_date, ",
            "crp_bloodSampling_date) AS sampling_date, ",
        "COALESCE(rna_sampling_time, dna_bloodsampling_time, ",
            "lipids_bloodsampling_time, crp_bloodsampling_time, ",
            "cellcount_bloodsampling_time) AS sampling_time, ",
        "sex, birth_year, weight, height, anthropometry_age, smoking, smoking_age, ",
        "ascertainment_criterion, totchol, triglycerides, hdlchol, ldlchol, ",
        "ldlcholmethod, hscrp, lipidmed, lipidsmed_age, lipids_bloodsampling_fasting, ",
        "rna_source, rna_rin, rna_a260a280ratio, rna_extraction_method, ",
        "rna_extraction_date, dna_source, dna_quantificationmethod, dna_a260a280ratio, ",
        "dna_extraction_method, dna_extraction_date, gwas_chip, ",
        "gwas_datageneration_date, baso, baso_perc, eos, eos_perc, granulocyte, ",
        "granulocyte_perc, luc, luc_perc, lymph, lymph_perc, mono, mono_perc, neut, ",
        "neut_perc, hct, hgb, mch, mchc, mcv, mpv, plt, rbc, rdw, wbc, ",
        "flowcell_num, machine, run_num, insert_size, rna_id ",
    "FROM rna_freeze ",
    "LEFT JOIN rna_run ON rna_freeze.rna_run_id = rna_run.rna_run_id ",
    "LEFT JOIN rna_sample ON rna_run.rna_sample_id = rna_sample.rna_sample_id ",
    "LEFT JOIN visit ON rna_sample.visit_id = visit.visit_id ",
    "LEFT JOIN person ON visit.person_id = person.person_id ",
    "LEFT JOIN gwas on person.person_id = gwas.person_id ",
    "LEFT JOIN dna_sample on visit.visit_id = dna_sample.visit_id ",
    "WHERE set = 'unrelated' AND freeze_num = 2;"),
  usrpwd = RP3_MDB_USRPWD)

Normalize inconsistent phenotype values

There are a number of fields which contain inconsistent values. The potentially affected fields are checked and adjusted accordingly.

table(freeze2_unrelated$biobank)
table(freeze2_unrelated$sex)
table(freeze2_unrelated$smoking)
table(freeze2_unrelated$ascertainment_criterion) #needs some normalization
table(freeze2_unrelated$ldlcholmethod)
table(freeze2_unrelated$lipidmed)
table(freeze2_unrelated$lipids_bloodsampling_fasting)
table(freeze2_unrelated$rna_source)
table(freeze2_unrelated$rna_extraction_method) # needs some normalization
table(freeze2_unrelated$dna_source)
table(freeze2_unrelated$dna_quantificationmethod) # needs some normalization
table(freeze2_unrelated$dna_extraction_method) # needs some normalization
table(freeze2_unrelated$gwas_chip) # needs some normalization

## ascertainment_criterion
freeze2_unrelated$ascertainment_criterion <- gsub("^GoNL$", "GONL_subject", 
                                                  freeze2_unrelated$ascertainment_criterion)
freeze2_unrelated$ascertainment_criterion <- gsub("^Complete genomics sequencing$",
                                                  "CG_subject", 
                                                  freeze2_unrelated$ascertainment_criterion)
freeze2_unrelated$ascertainment_criterion <- gsub("^GoNL / Complete genomics sequencing",
                                                  "GoNL/CG_subject", 
                                                  freeze2_unrelated$ascertainment_criterion)
table(freeze2_unrelated$ascertainment_criterion)

## rna_extraction_method
freeze2_unrelated$rna_extraction_method[!is.na(freeze2_unrelated$rna_extraction_method)] <- 
    "PAXgene Blood RNA Kit (Qiagen)"
table(freeze2_unrelated$rna_extraction_method)

## dna_quantificationmethod
freeze2_unrelated$dna_quantificationmethod <- gsub("nanodrop|nano", "Nanodrop", 
                                                   freeze2_unrelated$dna_quantificationmethod)
freeze2_unrelated$dna_quantificationmethod <- gsub(
    "spectrofotometer|Spectofotometer|spectofotometer", "Spectrofotometer", 
    freeze2_unrelated$dna_quantificationmethod)
table(freeze2_unrelated$dna_quantificationmethod)

## dna_extraction_method
freeze2_unrelated$dna_extraction_method <- gsub("salting out|Saltingout", "Salting out", 
                                                freeze2_unrelated$dna_extraction_method)
freeze2_unrelated$dna_extraction_method <- gsub("QIAamp DNA minikit", "DNA Mini Kit (Qiaamp)", 
                                                freeze2_unrelated$dna_extraction_method)
table(freeze2_unrelated$dna_extraction_method)

## gwas_chip
freeze2_unrelated$gwas_chip <- gsub(" *, *", "/", freeze2_unrelated$gwas_chip)
freeze2_unrelated$gwas_chip <- gsub("Illumina human omni express", "Illumina OmniExpress", 
                                    freeze2_unrelated$gwas_chip)
freeze2_unrelated$gwas_chip <- gsub("Illumina660", "Illumina Human660-Quad", 
                                    freeze2_unrelated$gwas_chip)
freeze2_unrelated$gwas_chip <- gsub("OverlappingSNPsfrom", "Overlapping SNPs from ",
                                    freeze2_unrelated$gwas_chip)
freeze2_unrelated$gwas_chip <- gsub("GONLSequenceData", "GONL", freeze2_unrelated$gwas_chip)
table(freeze2_unrelated$gwas_chip)

Contrust SummarizedExperiment per biobank

Zhernakova, D. V., P. Deelen, M. Vermaat, M. van Iterson, M. van Galen, W. Arindrarto, P. van ’t Hof, et al. 2017. “Identification of context-dependent expression quantitative trait loci in whole blood.” Nat. Genet. 49 (1): 139–45.