Last updated: 2018-08-28

workflowr checks: (Click a bullet for more information)
  • R Markdown file: uncommitted changes The R Markdown is untracked by Git. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

  • Environment: empty

    Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

  • Seed: set.seed(12345)

    The command set.seed(12345) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

  • Session information: recorded

    Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

  • Repository version: 241c630

    Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility. The version displayed above was the version of the Git repository at the time these results were generated.

    Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
    
    Ignored files:
        Ignored:    .DS_Store
        Ignored:    analysis/.DS_Store
        Ignored:    data/.DS_Store
        Ignored:    data/aux_info/
        Ignored:    data/hg_38/
        Ignored:    data/libParams/
        Ignored:    output/.DS_Store
    
    Untracked files:
        Untracked:  _workflowr.yml
        Untracked:  analysis/Collection_dates.Rmd
        Untracked:  analysis/Converting_IDs.Rmd
        Untracked:  analysis/Global_variation.Rmd
        Untracked:  analysis/Preliminary_clinical_covariate.Rmd
        Untracked:  analysis/VennDiagram2018-07-24_06-55-46.log
        Untracked:  analysis/VennDiagram2018-07-24_06-56-13.log
        Untracked:  analysis/VennDiagram2018-07-24_06-56-50.log
        Untracked:  analysis/VennDiagram2018-07-24_06-58-41.log
        Untracked:  analysis/VennDiagram2018-07-24_07-00-07.log
        Untracked:  analysis/VennDiagram2018-07-24_07-00-42.log
        Untracked:  analysis/VennDiagram2018-07-24_07-01-08.log
        Untracked:  analysis/VennDiagram2018-08-17_15-13-24.log
        Untracked:  analysis/VennDiagram2018-08-17_15-13-30.log
        Untracked:  analysis/VennDiagram2018-08-17_15-15-06.log
        Untracked:  analysis/VennDiagram2018-08-17_15-16-01.log
        Untracked:  analysis/VennDiagram2018-08-17_15-17-51.log
        Untracked:  analysis/VennDiagram2018-08-17_15-18-42.log
        Untracked:  analysis/VennDiagram2018-08-17_15-19-21.log
        Untracked:  analysis/VennDiagram2018-08-20_09-07-57.log
        Untracked:  analysis/VennDiagram2018-08-20_09-08-37.log
        Untracked:  analysis/VennDiagram2018-08-26_19-54-03.log
        Untracked:  analysis/VennDiagram2018-08-26_20-47-08.log
        Untracked:  analysis/VennDiagram2018-08-26_20-49-49.log
        Untracked:  analysis/VennDiagram2018-08-27_00-04-36.log
        Untracked:  analysis/VennDiagram2018-08-27_00-09-27.log
        Untracked:  analysis/VennDiagram2018-08-27_00-13-57.log
        Untracked:  analysis/VennDiagram2018-08-27_00-16-32.log
        Untracked:  analysis/VennDiagram2018-08-27_10-00-25.log
        Untracked:  analysis/View_DE_genes.Rmd
        Untracked:  analysis/background_dds_david.csv
        Untracked:  analysis/correlations_bet_covariates.Rmd
        Untracked:  analysis/correlations_over_time.Rmd
        Untracked:  analysis/genocode_annotation_info.Rmd
        Untracked:  analysis/genotypes.Rmd
        Untracked:  analysis/hg19_files.Rmd
        Untracked:  analysis/import_transcript_level_estimates.Rmd
        Untracked:  analysis/test_dds_david.csv
        Untracked:  analysis/tximport.Rmd
        Untracked:  analysis/unnormalized_data.Rmd
        Untracked:  analysis/variables_by_time.Rmd
        Untracked:  analysis/voom_limma.Rmd
        Untracked:  data/BAN2 Dates_T1_T2.xlsx
        Untracked:  data/BAN_DATES.csv
        Untracked:  data/BAN_DATES.xlsx
        Untracked:  data/BAN_DATES_txt.csv
        Untracked:  data/Ban_geno.csv
        Untracked:  data/Ban_geno.xlsx
        Untracked:  data/Blood_dates.txt
        Untracked:  data/DAVID_background.txt
        Untracked:  data/DAVID_list_T1T2.txt
        Untracked:  data/DAVID_list_T1T2_weight.txt
        Untracked:  data/DAVID_list_T2T3.txt
        Untracked:  data/DAVID_list_T2T3_weight.txt
        Untracked:  data/DAVID_results/
        Untracked:  data/DAVID_top100_list_T1T2.txt
        Untracked:  data/DAVID_top100_list_T1T2_weight.txt
        Untracked:  data/DAVID_top100_list_T2T3.txt
        Untracked:  data/DAVID_top100_list_T2T3_weight.txt
        Untracked:  data/Eigengenes/
        Untracked:  data/FemaleWeightRestoration-01-dataInput.RData
        Untracked:  data/FemaleWeightRestoration-resid-01-dataInput.RData
        Untracked:  data/FemaleWeightRestoration-resid-T1T2-01-dataInput.RData
        Untracked:  data/HTSF_IDs.sav
        Untracked:  data/Homo_sapiens.GRCh38.v22_table.txt
        Untracked:  data/Labels.csv
        Untracked:  data/Labels.xlsx
        Untracked:  data/RIN.xlsx
        Untracked:  data/RIN_over_time.csv
        Untracked:  data/RIN_over_time.xlsx
        Untracked:  data/T0_consolid.csv
        Untracked:  data/T0_consolid.xlsx
        Untracked:  data/age_t1.txt
        Untracked:  data/birthday_age.csv
        Untracked:  data/birthday_age.xlsx
        Untracked:  data/cmd_info.json
        Untracked:  data/counts_hg38_gc.RData
        Untracked:  data/counts_hg38_gc_dds.RData
        Untracked:  data/counts_hg38_gc_txsalmon.RData
        Untracked:  data/covar_lm.csv
        Untracked:  data/covar_lm_missing.csv
        Untracked:  data/eigengenes_T1_T2_cov_adj_exp_5_modules.txt
        Untracked:  data/eigengenes_T1_T2_module_background.txt
        Untracked:  data/eigengenes_adj_exp_7_modules.txt
        Untracked:  data/eigengenes_cov_adj_exp_14_modules.txt
        Untracked:  data/eigengenes_module_background.txt
        Untracked:  data/eigengenes_unadj_exp_10_modules.txt
        Untracked:  data/eigengenes_unadj_exp_6_modules.txt
        Untracked:  data/eigengenes_unadj_exp_9_modules.txt
        Untracked:  data/files_list.txt
        Untracked:  data/final_covariates.csv
        Untracked:  data/gene_exp_values_2202.txt
        Untracked:  data/gene_exp_values_2209.txt
        Untracked:  data/gene_exp_values_2218.txt
        Untracked:  data/gene_exp_values_2220.txt
        Untracked:  data/gene_exp_values_2226.txt
        Untracked:  data/gene_exp_values_2228.txt
        Untracked:  data/gene_names_58387.txt
        Untracked:  data/gene_to_tran.txt
        Untracked:  data/lm_covar_fixed_random.csv
        Untracked:  data/logs/
        Untracked:  data/module_T1T2_cov_adj_blue.txt
        Untracked:  data/module_T1T2_cov_adj_brown.txt
        Untracked:  data/module_T1T2_cov_adj_turquoise.txt
        Untracked:  data/module_T1T2_cov_adj_yellow.txt
        Untracked:  data/module_adj_cov_merged_blue.txt
        Untracked:  data/module_adj_cov_merged_brown.txt
        Untracked:  data/module_adj_cov_merged_cyan.txt
        Untracked:  data/module_adj_cov_merged_green.txt
        Untracked:  data/module_adj_cov_merged_greenyellow.txt
        Untracked:  data/module_adj_cov_merged_magenta.txt
        Untracked:  data/module_adj_cov_merged_red.txt
        Untracked:  data/module_adj_cov_merged_salmon.txt
        Untracked:  data/module_adj_cov_merged_tan.txt
        Untracked:  data/module_adj_cov_merged_yellow.txt
        Untracked:  data/module_black.txt
        Untracked:  data/module_blue.txt
        Untracked:  data/module_brown.txt
        Untracked:  data/module_cov_adj_black.txt
        Untracked:  data/module_cov_adj_blue.txt
        Untracked:  data/module_cov_adj_brown.txt
        Untracked:  data/module_cov_adj_cyan.txt
        Untracked:  data/module_cov_adj_green.txt
        Untracked:  data/module_cov_adj_greenyellow.txt
        Untracked:  data/module_cov_adj_magenta.txt
        Untracked:  data/module_cov_adj_pink.txt
        Untracked:  data/module_cov_adj_purple.txt
        Untracked:  data/module_cov_adj_red.txt
        Untracked:  data/module_cov_adj_salmon.txt
        Untracked:  data/module_cov_adj_tan.txt
        Untracked:  data/module_cov_adj_turquoise.txt
        Untracked:  data/module_cov_adj_yellow.txt
        Untracked:  data/module_cyan.txt
        Untracked:  data/module_green.txt
        Untracked:  data/module_greenyellow.txt
        Untracked:  data/module_magenta.txt
        Untracked:  data/module_merged_black.txt
        Untracked:  data/module_merged_blue.txt
        Untracked:  data/module_merged_brown.txt
        Untracked:  data/module_merged_cyan.txt
        Untracked:  data/module_merged_green.txt
        Untracked:  data/module_merged_greenyellow.txt
        Untracked:  data/module_merged_magenta.txt
        Untracked:  data/module_merged_pink.txt
        Untracked:  data/module_merged_purple.txt
        Untracked:  data/module_merged_red.txt
        Untracked:  data/module_merged_salmon.txt
        Untracked:  data/module_merged_tan.txt
        Untracked:  data/module_merged_turquoise.txt
        Untracked:  data/module_merged_yellow.txt
        Untracked:  data/module_pink.txt
        Untracked:  data/module_purple.txt
        Untracked:  data/module_red.txt
        Untracked:  data/module_salmon.txt
        Untracked:  data/module_tan.txt
        Untracked:  data/module_turquoise.txt
        Untracked:  data/module_yellow.txt
        Untracked:  data/notimecovariates.csv
        Untracked:  data/only_individuals_biomarkers_weight_restoration_study.xlsx
        Untracked:  data/pcs_genes.csv
        Untracked:  data/pcs_genes.txt
        Untracked:  data/rest1t2_BI_hg37.rds
        Untracked:  data/rest1t2_BI_hg38.rds
        Untracked:  data/rest1t2_hg37.rds
        Untracked:  data/rest1t2_psych_meds_BMI_hg37.rds
        Untracked:  data/rest1t2_psych_meds_hg37.rds
        Untracked:  data/rest2t3_BI_hg37.rds
        Untracked:  data/rest2t3_BI_hg38.rds
        Untracked:  data/rest2t3_hg37.rds
        Untracked:  data/rest2t3_psych_meds_BMI_hg37.rds
        Untracked:  data/rest2t3_psych_meds_hg37.rds
        Untracked:  data/salmon_gene_matrix_bak_reorder_time.txt
        Untracked:  data/technical_sample_info.csv
        Untracked:  data/tx_to_gene.txt
        Untracked:  data/tx_to_gene_37.txt
        Untracked:  data/usa2.pcawithref.menv.mds_cov
        Untracked:  data/~$Labels.xlsx
        Untracked:  data/~$T0_consolid.xlsx
        Untracked:  docs/VennDiagram2018-07-24_06-55-46.log
        Untracked:  docs/VennDiagram2018-07-24_06-56-13.log
        Untracked:  docs/VennDiagram2018-07-24_06-56-50.log
        Untracked:  docs/VennDiagram2018-07-24_06-58-41.log
        Untracked:  docs/VennDiagram2018-07-24_07-00-07.log
        Untracked:  docs/VennDiagram2018-07-24_07-00-42.log
        Untracked:  docs/VennDiagram2018-07-24_07-01-08.log
        Untracked:  docs/figure/
    
    Unstaged changes:
        Modified:   analysis/_site.yml
        Modified:   analysis/about.Rmd
        Deleted:    analysis/chunks.R
        Modified:   analysis/index.Rmd
        Modified:   analysis/license.Rmd
    
    
    Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.

Introduction

Evaluate transcript-level

# Install library

library("tximport")
library("GenomicFeatures")
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs
The following objects are masked from 'package:base':

    anyDuplicated, append, as.data.frame, cbind, colMeans,
    colnames, colSums, do.call, duplicated, eval, evalq, Filter,
    Find, get, grep, grepl, intersect, is.unsorted, lapply,
    lengths, Map, mapply, match, mget, order, paste, pmax,
    pmax.int, pmin, pmin.int, Position, rank, rbind, Reduce,
    rowMeans, rownames, rowSums, sapply, setdiff, sort, table,
    tapply, union, unique, unsplit, which, which.max, which.min
Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'
The following object is masked from 'package:base':

    expand.grid
Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: GenomicRanges
Loading required package: AnnotationDbi
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.
txdb2 <- makeTxDbFromGFF("/Users/laurenblake/Dropbox/Lauren Blake/Bioinformatics results/gencode.v22.annotation.gtf", format=c("gtf"),
                dataSource="Gencode online",
                organism="Homo sapiens",
                taxonomyId=NA,
                circ_seqs=character(),
                chrominfo=NULL,
                miRBaseBuild=NA,
                metadata=NULL)
Import genomic features from the file as a GRanges object ...
OK
Prepare the 'metadata' data frame ... OK
Make the TxDb object ... 
Warning in .get_cds_IDX(type, phase): The "phase" metadata column contains non-NA values for features of
  type stop_codon. This information was ignored.
OK
k <- keys(txdb2, keytype = "TXNAME")
tx2gene <- select(txdb2, k, "GENEID", "TXNAME")
'select()' returned 1:1 mapping between keys and columns
length(unique(tx2gene[,1]))
[1] 198442
length(unique(tx2gene[,2]))
[1] 60483

Awk command to go from annotation file to ENSG and gene name only

cat gencode.v28.annotation.gtf | awk ‘BEGIN{FS=“”}{split($9,a,“;”); if($3~“gene”) print a[1]“”a[3]“”$1“:”$4“-”$5“”$7}’ | sed ‘s/gene_id “//’ | sed ’s/gene_id”//’ | sed ‘s/gene_biotype “//’| sed ’s/gene_name”//’ | sed ’s/“//g’ > Homo_sapiens.GRCh38.92_table.txt

Session information

sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
[1] GenomicFeatures_1.30.3 AnnotationDbi_1.40.0   Biobase_2.38.0        
[4] GenomicRanges_1.30.3   GenomeInfoDb_1.14.0    IRanges_2.12.0        
[7] S4Vectors_0.16.0       BiocGenerics_0.24.0    tximport_1.6.0        

loaded via a namespace (and not attached):
 [1] SummarizedExperiment_1.8.1 progress_1.2.0            
 [3] lattice_0.20-35            htmltools_0.3.6           
 [5] rtracklayer_1.38.3         yaml_2.2.0                
 [7] blob_1.1.1                 XML_3.98-1.16             
 [9] rlang_0.2.2                R.oo_1.22.0               
[11] DBI_1.0.0                  R.utils_2.6.0             
[13] BiocParallel_1.12.0        bit64_0.9-7               
[15] matrixStats_0.54.0         GenomeInfoDbData_1.0.0    
[17] stringr_1.3.1              zlibbioc_1.24.0           
[19] Biostrings_2.46.0          workflowr_1.1.1           
[21] R.methodsS3_1.7.1          memoise_1.1.0             
[23] evaluate_0.11              knitr_1.20                
[25] biomaRt_2.34.2             Rcpp_0.12.18              
[27] backports_1.1.2            DelayedArray_0.4.1        
[29] XVector_0.18.0             bit_1.1-14                
[31] Rsamtools_1.30.0           RMySQL_0.10.15            
[33] hms_0.4.2                  digest_0.6.16             
[35] stringi_1.2.4              rprojroot_1.3-2           
[37] grid_3.4.3                 tools_3.4.3               
[39] bitops_1.0-6               magrittr_1.5              
[41] RCurl_1.95-4.11            RSQLite_2.1.1             
[43] crayon_1.3.4               whisker_0.3-2             
[45] pkgconfig_2.0.2            Matrix_1.2-14             
[47] prettyunits_1.0.2          assertthat_0.2.0          
[49] rmarkdown_1.10             httr_1.3.1                
[51] R6_2.2.2                   GenomicAlignments_1.14.2  
[53] git2r_0.23.0               compiler_3.4.3            



This reproducible R Markdown analysis was created with workflowr 1.1.1