Chapter 2 Importación de datos y carga de bibliotecas
2.1 Descarga de bibliotecas
## Cargar el paquete de recount3
library("recount3")
library("edgeR") # BiocManager::install("edgeR", update = FALSE)
library("ggplot2")
library("limma")
library("pheatmap")
library("RColorBrewer")
## Obtener todos los proyectos disponibles de recount3
<- available_projects() human_projects
2.2 Importación de datos y evaluación del objeto
## Descargar el proyecto SRP162774 - Variability in the Analgesic Response to Ibuprofen Following Third Molar Extraction is Associated with Differences in Activation of the Cyclooxygenase Pathway
<- subset(
proj_info
human_projects,== "SRP162774" & project_type == "data_sources"
project
)
## Crea un objeto de clase RangedSummarizedExperiment (RSE) con la información a nivel de genes
<- create_rse(proj_info) rse_gene_SRP162774
rse_gene_SRP162774
## class: RangedSummarizedExperiment
## dim: 63856 911
## metadata(8): time_created recount3_version ... annotation recount3_url
## assays(1): raw_counts
## rownames(63856): ENSG00000278704.1 ENSG00000277400.1 ...
## ENSG00000182484.15_PAR_Y ENSG00000227159.8_PAR_Y
## rowData names(10): source type ... havana_gene tag
## colnames(911): SRR7911000 SRR7911001 ... SRR7910995 SRR7910996
## colData names(175): rail_id external_id ...
## recount_pred.curated.cell_line BigWigURL
El objeto es analizado con el fin de conocer las categoría que contiene, y evaluar la homogeneidad de las mismas. Si existe algún problema tendrá que ser arreglado por medio de la curación o limpieza de los datos.
## Conversión de las cuentas por nucleotido a cuentas por lectura
assay(rse_gene_SRP162774, "counts") <- compute_read_counts(rse_gene_SRP162774)
##Obtener un resumen más completo sobre el objeto
<- expand_sra_attributes(rse_gene_SRP162774)
rse_gene_SRP162774
colData(rse_gene_SRP162774)[
,grepl("^sra_attribute", colnames(colData(rse_gene_SRP162774)))
]
## DataFrame with 911 rows and 8 columns
## sra_attribute.cell_type sra_attribute.drug_treatment
## <character> <character>
## SRR7911000 peripheral blood mon.. ibuprofen sodium
## SRR7911001 peripheral blood mon.. ibuprofen sodium
## SRR7911004 peripheral blood mon.. ibuprofen sodium
## SRR7911005 peripheral blood mon.. ibuprofen sodium
## SRR7911006 peripheral blood mon.. ibuprofen sodium
## ... ... ...
## SRR7910943 peripheral blood mon.. Placebo
## SRR7910948 peripheral blood mon.. Placebo
## SRR7910954 peripheral blood mon.. Placebo
## SRR7910995 peripheral blood mon.. ibuprofen sodium
## SRR7910996 peripheral blood mon.. ibuprofen sodium
## sra_attribute.gender sra_attribute.library_barcode
## <character> <character>
## SRR7911000 female TCTCGCGC-GGCTCTGA
## SRR7911001 female TCTCGCGC-GGCTCTGA
## SRR7911004 male AGCGATAG-GGCTCTGA
## SRR7911005 male AGCGATAG-GGCTCTGA
## SRR7911006 male AGCGATAG-GGCTCTGA
## ... ... ...
## SRR7910943 female CTGAAGCT-GGCTCTGA
## SRR7910948 female TAATGCGC-GGCTCTGA
## SRR7910954 female TAATGCGC-GGCTCTGA
## SRR7910995 female TCTCGCGC-GGCTCTGA
## SRR7910996 female TCTCGCGC-GGCTCTGA
## sra_attribute.response_group sra_attribute.source_name
## <character> <character>
## SRR7911000 Partial responder peripheral blood mon..
## SRR7911001 Partial responder peripheral blood mon..
## SRR7911004 Full responder peripheral blood mon..
## SRR7911005 Full responder peripheral blood mon..
## SRR7911006 Full responder peripheral blood mon..
## ... ... ...
## SRR7910943 Placebo peripheral blood mon..
## SRR7910948 Placebo peripheral blood mon..
## SRR7910954 Placebo peripheral blood mon..
## SRR7910995 Partial responder peripheral blood mon..
## SRR7910996 Partial responder peripheral blood mon..
## sra_attribute.subject sra_attribute.timepoint
## <character> <character>
## SRR7911000 1021 post-surgery 2
## SRR7911001 1021 post-surgery 2
## SRR7911004 1022 baseline
## SRR7911005 1022 baseline
## SRR7911006 1022 baseline
## ... ... ...
## SRR7910943 1020 post-surgery 1
## SRR7910948 1020 post-surgery 2
## SRR7910954 1020 post-surgery 2
## SRR7910995 1021 post-surgery 2
## SRR7910996 1021 post-surgery 2
Al observar una buena integridad de los datos en el paso anterior, no será necesario hacer una limpieza de ellos. Para el análisis de expresión diferencial, se utilizarán dos atributos del objeto drug_treatment y gender, ambos pueden ser manejados como dummy variables.
##Verificar los valores de las características a evaluar.
table(rse_gene_SRP162774$sra_attribute.drug_treatment)
##
## ibuprofen sodium Placebo
## 577 334
table(rse_gene_SRP162774$sra_attribute.gender)
##
## female male
## 416 495