inst/scripts/make-data_gencode_human.R

## This file was made by generate_make_data_gencode_human.R
## though the actual files were generated by data-raw/build_gencode_human.R
## and submitted as array jobs at JHPCE. This script will work sequentually
## and will reproduce the same files.


## Build genomic state objects for multiple Gencode versions

library('GenomicState')
library('AnnotationDbi')
library('sessioninfo')

outdir <- 'gencode'
dir.create(outdir, showWarnings = FALSE)

 
## Build and save the TxDb object
gencode_v23_hg19_txdb <- gencode_txdb('23', 'hg19')
saveDb(gencode_v23_hg19_txdb,
    file = file.path(outdir, 'gencode_v23_hg19_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v23_hg19_annotated_genes<- gencode_annotated_genes(
    gencode_v23_hg19_txdb
)
save(gencode_v23_hg19_annotated_genes,
    file = file.path(outdir, 'gencode_v23_hg19_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v23_hg19_GenomicState <- gencode_genomic_state(
    gencode_v23_hg19_txdb
)
save(gencode_v23_hg19_GenomicState,
    file = file.path(outdir, 'gencode_v23_hg19_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v23_hg38_txdb <- gencode_txdb('23', 'hg38')
saveDb(gencode_v23_hg38_txdb,
    file = file.path(outdir, 'gencode_v23_hg38_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v23_hg38_annotated_genes<- gencode_annotated_genes(
    gencode_v23_hg38_txdb
)
save(gencode_v23_hg38_annotated_genes,
    file = file.path(outdir, 'gencode_v23_hg38_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v23_hg38_GenomicState <- gencode_genomic_state(
    gencode_v23_hg38_txdb
)
save(gencode_v23_hg38_GenomicState,
    file = file.path(outdir, 'gencode_v23_hg38_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v24_hg19_txdb <- gencode_txdb('24', 'hg19')
saveDb(gencode_v24_hg19_txdb,
    file = file.path(outdir, 'gencode_v24_hg19_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v24_hg19_annotated_genes<- gencode_annotated_genes(
    gencode_v24_hg19_txdb
)
save(gencode_v24_hg19_annotated_genes,
    file = file.path(outdir, 'gencode_v24_hg19_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v24_hg19_GenomicState <- gencode_genomic_state(
    gencode_v24_hg19_txdb
)
save(gencode_v24_hg19_GenomicState,
    file = file.path(outdir, 'gencode_v24_hg19_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v24_hg38_txdb <- gencode_txdb('24', 'hg38')
saveDb(gencode_v24_hg38_txdb,
    file = file.path(outdir, 'gencode_v24_hg38_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v24_hg38_annotated_genes<- gencode_annotated_genes(
    gencode_v24_hg38_txdb
)
save(gencode_v24_hg38_annotated_genes,
    file = file.path(outdir, 'gencode_v24_hg38_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v24_hg38_GenomicState <- gencode_genomic_state(
    gencode_v24_hg38_txdb
)
save(gencode_v24_hg38_GenomicState,
    file = file.path(outdir, 'gencode_v24_hg38_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v25_hg19_txdb <- gencode_txdb('25', 'hg19')
saveDb(gencode_v25_hg19_txdb,
    file = file.path(outdir, 'gencode_v25_hg19_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v25_hg19_annotated_genes<- gencode_annotated_genes(
    gencode_v25_hg19_txdb
)
save(gencode_v25_hg19_annotated_genes,
    file = file.path(outdir, 'gencode_v25_hg19_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v25_hg19_GenomicState <- gencode_genomic_state(
    gencode_v25_hg19_txdb
)
save(gencode_v25_hg19_GenomicState,
    file = file.path(outdir, 'gencode_v25_hg19_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v25_hg38_txdb <- gencode_txdb('25', 'hg38')
saveDb(gencode_v25_hg38_txdb,
    file = file.path(outdir, 'gencode_v25_hg38_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v25_hg38_annotated_genes<- gencode_annotated_genes(
    gencode_v25_hg38_txdb
)
save(gencode_v25_hg38_annotated_genes,
    file = file.path(outdir, 'gencode_v25_hg38_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v25_hg38_GenomicState <- gencode_genomic_state(
    gencode_v25_hg38_txdb
)
save(gencode_v25_hg38_GenomicState,
    file = file.path(outdir, 'gencode_v25_hg38_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v26_hg19_txdb <- gencode_txdb('26', 'hg19')
saveDb(gencode_v26_hg19_txdb,
    file = file.path(outdir, 'gencode_v26_hg19_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v26_hg19_annotated_genes<- gencode_annotated_genes(
    gencode_v26_hg19_txdb
)
save(gencode_v26_hg19_annotated_genes,
    file = file.path(outdir, 'gencode_v26_hg19_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v26_hg19_GenomicState <- gencode_genomic_state(
    gencode_v26_hg19_txdb
)
save(gencode_v26_hg19_GenomicState,
    file = file.path(outdir, 'gencode_v26_hg19_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v26_hg38_txdb <- gencode_txdb('26', 'hg38')
saveDb(gencode_v26_hg38_txdb,
    file = file.path(outdir, 'gencode_v26_hg38_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v26_hg38_annotated_genes<- gencode_annotated_genes(
    gencode_v26_hg38_txdb
)
save(gencode_v26_hg38_annotated_genes,
    file = file.path(outdir, 'gencode_v26_hg38_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v26_hg38_GenomicState <- gencode_genomic_state(
    gencode_v26_hg38_txdb
)
save(gencode_v26_hg38_GenomicState,
    file = file.path(outdir, 'gencode_v26_hg38_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v27_hg19_txdb <- gencode_txdb('27', 'hg19')
saveDb(gencode_v27_hg19_txdb,
    file = file.path(outdir, 'gencode_v27_hg19_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v27_hg19_annotated_genes<- gencode_annotated_genes(
    gencode_v27_hg19_txdb
)
save(gencode_v27_hg19_annotated_genes,
    file = file.path(outdir, 'gencode_v27_hg19_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v27_hg19_GenomicState <- gencode_genomic_state(
    gencode_v27_hg19_txdb
)
save(gencode_v27_hg19_GenomicState,
    file = file.path(outdir, 'gencode_v27_hg19_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v27_hg38_txdb <- gencode_txdb('27', 'hg38')
saveDb(gencode_v27_hg38_txdb,
    file = file.path(outdir, 'gencode_v27_hg38_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v27_hg38_annotated_genes<- gencode_annotated_genes(
    gencode_v27_hg38_txdb
)
save(gencode_v27_hg38_annotated_genes,
    file = file.path(outdir, 'gencode_v27_hg38_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v27_hg38_GenomicState <- gencode_genomic_state(
    gencode_v27_hg38_txdb
)
save(gencode_v27_hg38_GenomicState,
    file = file.path(outdir, 'gencode_v27_hg38_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v28_hg19_txdb <- gencode_txdb('28', 'hg19')
saveDb(gencode_v28_hg19_txdb,
    file = file.path(outdir, 'gencode_v28_hg19_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v28_hg19_annotated_genes<- gencode_annotated_genes(
    gencode_v28_hg19_txdb
)
save(gencode_v28_hg19_annotated_genes,
    file = file.path(outdir, 'gencode_v28_hg19_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v28_hg19_GenomicState <- gencode_genomic_state(
    gencode_v28_hg19_txdb
)
save(gencode_v28_hg19_GenomicState,
    file = file.path(outdir, 'gencode_v28_hg19_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v28_hg38_txdb <- gencode_txdb('28', 'hg38')
saveDb(gencode_v28_hg38_txdb,
    file = file.path(outdir, 'gencode_v28_hg38_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v28_hg38_annotated_genes<- gencode_annotated_genes(
    gencode_v28_hg38_txdb
)
save(gencode_v28_hg38_annotated_genes,
    file = file.path(outdir, 'gencode_v28_hg38_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v28_hg38_GenomicState <- gencode_genomic_state(
    gencode_v28_hg38_txdb
)
save(gencode_v28_hg38_GenomicState,
    file = file.path(outdir, 'gencode_v28_hg38_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v29_hg19_txdb <- gencode_txdb('29', 'hg19')
saveDb(gencode_v29_hg19_txdb,
    file = file.path(outdir, 'gencode_v29_hg19_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v29_hg19_annotated_genes<- gencode_annotated_genes(
    gencode_v29_hg19_txdb
)
save(gencode_v29_hg19_annotated_genes,
    file = file.path(outdir, 'gencode_v29_hg19_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v29_hg19_GenomicState <- gencode_genomic_state(
    gencode_v29_hg19_txdb
)
save(gencode_v29_hg19_GenomicState,
    file = file.path(outdir, 'gencode_v29_hg19_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v29_hg38_txdb <- gencode_txdb('29', 'hg38')
saveDb(gencode_v29_hg38_txdb,
    file = file.path(outdir, 'gencode_v29_hg38_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v29_hg38_annotated_genes<- gencode_annotated_genes(
    gencode_v29_hg38_txdb
)
save(gencode_v29_hg38_annotated_genes,
    file = file.path(outdir, 'gencode_v29_hg38_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v29_hg38_GenomicState <- gencode_genomic_state(
    gencode_v29_hg38_txdb
)
save(gencode_v29_hg38_GenomicState,
    file = file.path(outdir, 'gencode_v29_hg38_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v30_hg19_txdb <- gencode_txdb('30', 'hg19')
saveDb(gencode_v30_hg19_txdb,
    file = file.path(outdir, 'gencode_v30_hg19_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v30_hg19_annotated_genes<- gencode_annotated_genes(
    gencode_v30_hg19_txdb
)
save(gencode_v30_hg19_annotated_genes,
    file = file.path(outdir, 'gencode_v30_hg19_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v30_hg19_GenomicState <- gencode_genomic_state(
    gencode_v30_hg19_txdb
)
save(gencode_v30_hg19_GenomicState,
    file = file.path(outdir, 'gencode_v30_hg19_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v30_hg38_txdb <- gencode_txdb('30', 'hg38')
saveDb(gencode_v30_hg38_txdb,
    file = file.path(outdir, 'gencode_v30_hg38_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v30_hg38_annotated_genes<- gencode_annotated_genes(
    gencode_v30_hg38_txdb
)
save(gencode_v30_hg38_annotated_genes,
    file = file.path(outdir, 'gencode_v30_hg38_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v30_hg38_GenomicState <- gencode_genomic_state(
    gencode_v30_hg38_txdb
)
save(gencode_v30_hg38_GenomicState,
    file = file.path(outdir, 'gencode_v30_hg38_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v31_hg19_txdb <- gencode_txdb('31', 'hg19')
saveDb(gencode_v31_hg19_txdb,
    file = file.path(outdir, 'gencode_v31_hg19_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v31_hg19_annotated_genes<- gencode_annotated_genes(
    gencode_v31_hg19_txdb
)
save(gencode_v31_hg19_annotated_genes,
    file = file.path(outdir, 'gencode_v31_hg19_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v31_hg19_GenomicState <- gencode_genomic_state(
    gencode_v31_hg19_txdb
)
save(gencode_v31_hg19_GenomicState,
    file = file.path(outdir, 'gencode_v31_hg19_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v31_hg38_txdb <- gencode_txdb('31', 'hg38')
saveDb(gencode_v31_hg38_txdb,
    file = file.path(outdir, 'gencode_v31_hg38_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v31_hg38_annotated_genes<- gencode_annotated_genes(
    gencode_v31_hg38_txdb
)
save(gencode_v31_hg38_annotated_genes,
    file = file.path(outdir, 'gencode_v31_hg38_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v31_hg38_GenomicState <- gencode_genomic_state(
    gencode_v31_hg38_txdb
)
save(gencode_v31_hg38_GenomicState,
    file = file.path(outdir, 'gencode_v31_hg38_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v32_hg19_txdb <- gencode_txdb('32', 'hg19')
saveDb(gencode_v32_hg19_txdb,
    file = file.path(outdir, 'gencode_v32_hg19_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v32_hg19_annotated_genes<- gencode_annotated_genes(
    gencode_v32_hg19_txdb
)
save(gencode_v32_hg19_annotated_genes,
    file = file.path(outdir, 'gencode_v32_hg19_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v32_hg19_GenomicState <- gencode_genomic_state(
    gencode_v32_hg19_txdb
)
save(gencode_v32_hg19_GenomicState,
    file = file.path(outdir, 'gencode_v32_hg19_GenomicState.rda'))
 
## Build and save the TxDb object
gencode_v32_hg38_txdb <- gencode_txdb('32', 'hg38')
saveDb(gencode_v32_hg38_txdb,
    file = file.path(outdir, 'gencode_v32_hg38_txdb.sqlite'))

## Build and save the annotateTranscripts output
gencode_v32_hg38_annotated_genes<- gencode_annotated_genes(
    gencode_v32_hg38_txdb
)
save(gencode_v32_hg38_annotated_genes,
    file = file.path(outdir, 'gencode_v32_hg38_annotated_genes.rda'))

## Build and save the GenomicState
gencode_v32_hg38_GenomicState <- gencode_genomic_state(
    gencode_v32_hg38_txdb
)
save(gencode_v32_hg38_GenomicState,
    file = file.path(outdir, 'gencode_v32_hg38_GenomicState.rda'))
 

## Reproducibility information
print('Reproducibility information:')
Sys.time()
proc.time()
options(width = 120)
session_info()
LieberInstitute/GenomicState documentation built on May 12, 2023, 5:15 p.m.