# NOT RUN {
#This example assumes an experimenal design of ~Condition_Time.
#Prepare a result list.
res.day1 <- results(dds, contrast=c("Condition_Time", "day1_disease", "day1_control"))
res.day2 <- results(dds, contrast=c("Condition_Time", "day2_disease", "day2_control"))
res.day3 <- results(dds, contrast=c("Condition_Time", "day3_disease", "day3_control"))
myResList <- list(res.day1, res.day2, res.day3)
/*
* Sort data by the highest expression level for any individual gene in any sample.
* Select the top 50 genes from this sort and visualize them in the plot.
*/
de_profile_plot(res_list=myResList, filename="DE_profile_upReg50.pdf",
sort_choice="max",
numGenes=50, theme=1, returnData=FALSE)
/*
* Calculate the mean expression for each gene across all three time points.
* Sort the data by minimum mean expression, select the top 25 genes,
* and visualize them in the plot.
*/
de_profile_plot(res_list=myResList, filename="DE_profile_meanDownReg25.pdf",
sort_choice="min_mean",
numGenes=25, theme=1, returnData=FALSE)
/*
* Calculate the variance for each gene across all three time points.
* Sort the data by the highest gene-wise variance, select 30 genes
* with the highest variance, and visualize them in the plot.
* Save the data used to generate the plot as highVar_df.
*/
highVar_df <- de_profile_plot(res_list=myResList, filename="DE_profile_highVar30.pdf",
sort_choice="variance", numGenes=30, theme=1, returnData=TRUE)
# }
Run the code above in your browser using DataLab