Libraries
library(Biobase)
## 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, basename, cbind,
## colMeans, colnames, colSums, dirname, 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
## Welcome to Bioconductor
##
## Vignettes contain introductory material; view with
## 'browseVignettes()'. To cite Bioconductor, see
## 'citation("Biobase")', and for packages 'citation("pkgname")'.
library(BiocGenerics)
library(GenomicFeatures)
## 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
##
## Attaching package: 'IRanges'
## The following object is masked from 'package:grDevices':
##
## windows
## Loading required package: GenomeInfoDb
## Loading required package: GenomicRanges
## Loading required package: AnnotationDbi
library(IRanges)
library(GenomicRanges)
library(GenomeInfoDb)
library(AnnotationDbi)
library(TxDb.Hsapiens.UCSC.hg38.knownGene)
##Additional required libraries: GenomicFeatures, BiocGenerics, IRanges, GenomeInfoDb, GenomicRanges, AnnotationDbi, Biobase
Homo sapiens hg38 transcript database
txdb <- TxDb.Hsapiens.UCSC.hg38.knownGene
txdb
## TxDb object:
## # Db type: TxDb
## # Supporting package: GenomicFeatures
## # Data source: UCSC
## # Genome: hg38
## # Organism: Homo sapiens
## # Taxonomy ID: 9606
## # UCSC Table: knownGene
## # UCSC Track: GENCODE v24
## # Resource URL: http://genome.ucsc.edu/
## # Type of Gene ID: Entrez Gene ID
## # Full dataset: yes
## # miRBase build ID: NA
## # transcript_nrow: 197782
## # exon_nrow: 581036
## # cds_nrow: 293052
## # Db created by: GenomicFeatures package from Bioconductor
## # Creation time: 2016-09-29 13:02:09 +0000 (Thu, 29 Sep 2016)
## # GenomicFeatures version at creation time: 1.25.18
## # RSQLite version at creation time: 1.0.0
## # DBSCHEMAVERSION: 1.1
Extract the cordinates of genes, transcripts, exons and introns for multiple CHRN genes
HsCHRNA1="1134"
HsCHRNA2="1135"
HsCHRNA3="1136"
HsCHRNA4="1137"
HsCHRNA5="1138"
HsCHRNA6 ="8973"
HsCHRNA7="1139"
HsCHRNA9="55584"
HsCHRNA10="57053"
HsCHRNB1="1140"
HsCHRNB2="1141"
HsCHRNB3="1142"
HsCHRNB4="1143"
HsCHRNG="1144"
HsCHRND="1145"
HsCHRNE="1146"
HsCHRNgenes = c(HsCHRNA1, HsCHRNA2, HsCHRNA3, HsCHRNA4, HsCHRNA5, HsCHRNA6,
HsCHRNA7, HsCHRNA9, HsCHRNA10, HsCHRNB1, HsCHRNB2, HsCHRNB3,
HsCHRNB4, HsCHRND, HsCHRNE, HsCHRNG)
hschrn_txs = transcriptsBy(txdb, by = "gene")[HsCHRNgenes]
hschrn_txs #GRangesList object of length 16
## GRangesList object of length 16:
## $1134
## GRanges object with 6 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## [1] chr2 174747592-174764472 - | 27362 uc002uje.3
## [2] chr2 174747660-174764461 - | 27363 uc002ujd.3
## [3] chr2 174747810-174764412 - | 27364 uc061pvt.1
## [4] chr2 174747810-174764412 - | 27365 uc061pvu.1
## [5] chr2 174747810-174764412 - | 27366 uc061pvv.1
## [6] chr2 174752755-174764453 - | 27367 uc002ujf.6
##
## $1135
## GRanges object with 11 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## [1] chr8 27459761-27479296 - | 76287 uc010lur.5
## [2] chr8 27460576-27467517 - | 76288 uc064lkz.1
## [3] chr8 27461098-27479013 - | 76289 uc064lla.2
## [4] chr8 27461098-27479214 - | 76290 uc064llb.1
## [5] chr8 27461603-27478851 - | 76291 uc011lal.4
## [6] chr8 27463628-27469408 - | 76292 uc064llc.1
## [7] chr8 27469349-27479883 - | 76293 uc064lld.1
## [8] chr8 27469812-27478929 - | 76294 uc064lle.1
## [9] chr8 27469905-27475502 - | 76295 uc064llg.1
## [10] chr8 27471002-27479857 - | 76296 uc064llh.1
## [11] chr8 27471140-27479291 - | 76297 uc284qjn.1
##
## ...
## <14 more elements>
## -------
## seqinfo: 455 sequences (1 circular) from hg38 genome
HsCHRNA6 =“8973”
hschrn_txs$`8973`
## GRanges object with 5 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## [1] chr8 42752620-42768786 - | 76718 uc003xpj.5
## [2] chr8 42752927-42768610 - | 76719 uc011lcw.4
## [3] chr8 42756629-42796392 - | 76720 uc064mmy.1
## [4] chr8 42756940-42768632 - | 76721 uc064mmz.1
## [5] chr8 42764973-42768648 - | 76722 uc064mna.1
## -------
## seqinfo: 455 sequences (1 circular) from hg38 genome
HsCHRNA7=“1139”
hschrn_txs$`1139`
## GRanges object with 4 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id
## <Rle> <IRanges> <Rle> | <integer>
## [1] chr15 32030488-32168848 + | 123436
## [2] chr15 32030498-32172521 + | 123437
## [3] chr15 32030556-32168888 + | 123438
## [4] chr15_KI270905v1_alt 4315611-4454253 + | 193611
## tx_name
## <character>
## [1] uc021sic.3
## [2] uc001zft.5
## [3] uc059hdo.1
## [4] uc032dkm.2
## -------
## seqinfo: 455 sequences (1 circular) from hg38 genome
HsCHRNA9=“55584”
hschrn_txs$`55584`
## GRanges object with 3 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## [1] chr4 40335329-40355217 + | 41624 uc003gva.2
## [2] chr4 40337286-40348139 + | 41625 uc062wdd.1
## [3] chr4 40349587-40354094 + | 41626 uc062wde.1
## -------
## seqinfo: 455 sequences (1 circular) from hg38 genome
HsCHRNA10=“57053”
hschrn_txs$`57053`
## GRanges object with 4 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## [1] chr11 3665587-3671384 - | 97393 uc001lyf.3
## [2] chr11 3666036-3671367 - | 97394 uc057ycm.1
## [3] chr11 3666036-3671367 - | 97395 uc057ycn.1
## [4] chr11 3668500-3669887 - | 97396 uc057yco.1
## -------
## seqinfo: 455 sequences (1 circular) from hg38 genome
HsCHRNB1=“1140”
hschrn_txs$`1140`
## GRanges object with 8 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## [1] chr17 7445061-7457707 + | 139651 uc002ghb.4
## [2] chr17 7445064-7447089 + | 139652 uc060apn.1
## [3] chr17 7445108-7445774 + | 139653 uc060apo.1
## [4] chr17 7445339-7455860 + | 139654 uc060app.1
## [5] chr17 7445503-7456926 + | 139655 uc010vty.3
## [6] chr17 7445531-7457315 + | 139656 uc060apq.1
## [7] chr17 7445543-7455689 + | 139657 uc010vtz.2
## [8] chr17 7455594-7457329 + | 139658 uc060apr.1
## -------
## seqinfo: 455 sequences (1 circular) from hg38 genome
HsCHRNB2=“1141”
hschrn_txs$`1141`
## GRanges object with 1 range and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## [1] chr1 154567781-154580026 + | 5240 uc001ffg.4
## -------
## seqinfo: 455 sequences (1 circular) from hg38 genome
HsCHRNB3=“1142”
hschrn_txs$`1142`
## GRanges object with 3 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## [1] chr8 42697376-42708758 + | 73614 uc064mmv.1
## [2] chr8 42697376-42710435 + | 73615 uc064mmw.1
## [3] chr8 42697419-42737407 + | 73616 uc003xpi.2
## -------
## seqinfo: 455 sequences (1 circular) from hg38 genome
HsCHRNB4=“1143”
hschrn_txs$`1143`
## GRanges object with 4 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## [1] chr15 78624119-78641245 - | 129025 uc002bed.2
## [2] chr15 78624408-78641245 - | 129026 uc002bee.2
## [3] chr15 78629353-78660532 - | 129027 uc059mfg.1
## [4] chr15 78631062-78720286 - | 129028 uc059mfh.1
## -------
## seqinfo: 455 sequences (1 circular) from hg38 genome
HsCHRNG=“1144”
hschrn_txs$`1144`
## GRanges object with 6 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## [1] chr2 232525993-232536667 + | 22358 uc021vyi.3
## [2] chr2 232526160-232528913 + | 22359 uc061tpi.1
## [3] chr2 232526160-232536665 + | 22360 uc010zmg.3
## [4] chr2 232526184-232535838 + | 22361 uc002vsw.5
## [5] chr2 232526188-232531627 + | 22362 uc061tpj.1
## [6] chr2 232526191-232535345 + | 22363 uc061tpk.1
## -------
## seqinfo: 455 sequences (1 circular) from hg38 genome
HsCHRND=“1145”
hschrn_txs$`1145`
## GRanges object with 3 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## [1] chr17 4897774-4903074 - | 145299 uc002fzk.2
## [2] chr17 4898057-4901811 - | 145300 uc059zxd.1
## [3] chr17 4901009-4902630 - | 145301 uc059zxe.1
## -------
## seqinfo: 455 sequences (1 circular) from hg38 genome
HsCHRNE=“1146”
hschrn_txs$`1146`
## GRanges object with 3 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## [1] chr2 232539727-232541882 + | 22364 uc010fyd.4
## [2] chr2 232539727-232546403 + | 22365 uc002vsx.1
## [3] chr2 232539748-232545716 + | 22366 uc010fye.2
## -------
## seqinfo: 455 sequences (1 circular) from hg38 genome
Make a dataframe of all the infomation
hschrn_txs_df <- data.frame(hschrn_txs)
hschrn_txs_df
## group group_name seqnames start end width strand
## 1 1 1134 chr2 174747592 174764472 16881 -
## 2 1 1134 chr2 174747660 174764461 16802 -
## 3 1 1134 chr2 174747810 174764412 16603 -
## 4 1 1134 chr2 174747810 174764412 16603 -
## 5 1 1134 chr2 174747810 174764412 16603 -
## 6 1 1134 chr2 174752755 174764453 11699 -
## 7 2 1135 chr8 27459761 27479296 19536 -
## 8 2 1135 chr8 27460576 27467517 6942 -
## 9 2 1135 chr8 27461098 27479013 17916 -
## 10 2 1135 chr8 27461098 27479214 18117 -
## 11 2 1135 chr8 27461603 27478851 17249 -
## 12 2 1135 chr8 27463628 27469408 5781 -
## 13 2 1135 chr8 27469349 27479883 10535 -
## 14 2 1135 chr8 27469812 27478929 9118 -
## 15 2 1135 chr8 27469905 27475502 5598 -
## 16 2 1135 chr8 27471002 27479857 8856 -
## 17 2 1135 chr8 27471140 27479291 8152 -
## 18 3 1136 chr15 78593052 78596732 3681 -
## 19 3 1136 chr15 78593052 78620863 27812 -
## 20 3 1136 chr15 78593052 78621295 28244 -
## 21 3 1136 chr15 78595305 78621179 25875 -
## 22 3 1136 chr15 78601776 78607524 5749 -
## 23 3 1136 chr15 78618380 78620789 2410 -
## 24 3 1136 chr15 78618630 78619278 649 -
## 25 3 1136 chr15 78618849 78620261 1413 -
## 26 4 1137 chr20 63343223 63361343 18121 -
## 27 4 1137 chr20 63343310 63361396 18087 -
## 28 4 1137 chr20 63344069 63377993 33925 -
## 29 4 1137 chr20 63346594 63359699 13106 -
## 30 4 1137 chr20 63346594 63361304 14711 -
## 31 4 1137 chr20 63346594 63361304 14711 -
## 32 4 1137 chr20 63350908 63361190 10283 -
## 33 5 1138 chr15 78565520 78595269 29750 +
## 34 5 1138 chr15 78565571 78593535 27965 +
## 35 5 1138 chr15 78580890 78593274 12385 +
## 36 5 1138 chr15 78590362 78593701 3340 +
## 37 6 8973 chr8 42752620 42768786 16167 -
## 38 6 8973 chr8 42752927 42768610 15684 -
## 39 6 8973 chr8 42756629 42796392 39764 -
## 40 6 8973 chr8 42756940 42768632 11693 -
## 41 6 8973 chr8 42764973 42768648 3676 -
## 42 7 1139 chr15 32030488 32168848 138361 +
## 43 7 1139 chr15 32030498 32172521 142024 +
## 44 7 1139 chr15 32030556 32168888 138333 +
## 45 7 1139 chr15_KI270905v1_alt 4315611 4454253 138643 +
## 46 8 55584 chr4 40335329 40355217 19889 +
## 47 8 55584 chr4 40337286 40348139 10854 +
## 48 8 55584 chr4 40349587 40354094 4508 +
## 49 9 57053 chr11 3665587 3671384 5798 -
## 50 9 57053 chr11 3666036 3671367 5332 -
## 51 9 57053 chr11 3666036 3671367 5332 -
## 52 9 57053 chr11 3668500 3669887 1388 -
## 53 10 1140 chr17 7445061 7457707 12647 +
## 54 10 1140 chr17 7445064 7447089 2026 +
## 55 10 1140 chr17 7445108 7445774 667 +
## 56 10 1140 chr17 7445339 7455860 10522 +
## 57 10 1140 chr17 7445503 7456926 11424 +
## 58 10 1140 chr17 7445531 7457315 11785 +
## 59 10 1140 chr17 7445543 7455689 10147 +
## 60 10 1140 chr17 7455594 7457329 1736 +
## 61 11 1141 chr1 154567781 154580026 12246 +
## 62 12 1142 chr8 42697376 42708758 11383 +
## 63 12 1142 chr8 42697376 42710435 13060 +
## 64 12 1142 chr8 42697419 42737407 39989 +
## 65 13 1143 chr15 78624119 78641245 17127 -
## 66 13 1143 chr15 78624408 78641245 16838 -
## 67 13 1143 chr15 78629353 78660532 31180 -
## 68 13 1143 chr15 78631062 78720286 89225 -
## 69 14 1145 chr17 4897774 4903074 5301 -
## 70 14 1145 chr17 4898057 4901811 3755 -
## 71 14 1145 chr17 4901009 4902630 1622 -
## 72 15 1146 chr2 232539727 232541882 2156 +
## 73 15 1146 chr2 232539727 232546403 6677 +
## 74 15 1146 chr2 232539748 232545716 5969 +
## 75 16 1144 chr2 232525993 232536667 10675 +
## 76 16 1144 chr2 232526160 232528913 2754 +
## 77 16 1144 chr2 232526160 232536665 10506 +
## 78 16 1144 chr2 232526184 232535838 9655 +
## 79 16 1144 chr2 232526188 232531627 5440 +
## 80 16 1144 chr2 232526191 232535345 9155 +
## tx_id tx_name
## 1 27362 uc002uje.3
## 2 27363 uc002ujd.3
## 3 27364 uc061pvt.1
## 4 27365 uc061pvu.1
## 5 27366 uc061pvv.1
## 6 27367 uc002ujf.6
## 7 76287 uc010lur.5
## 8 76288 uc064lkz.1
## 9 76289 uc064lla.2
## 10 76290 uc064llb.1
## 11 76291 uc011lal.4
## 12 76292 uc064llc.1
## 13 76293 uc064lld.1
## 14 76294 uc064lle.1
## 15 76295 uc064llg.1
## 16 76296 uc064llh.1
## 17 76297 uc284qjn.1
## 18 129016 uc010blg.3
## 19 129017 uc059mfa.1
## 20 129018 uc002beb.4
## 21 129019 uc002bec.4
## 22 129021 uc059mfc.1
## 23 129022 uc059mfd.1
## 24 129023 uc059mfe.1
## 25 129024 uc059mff.1
## 26 170358 uc002yes.4
## 27 170359 uc010gke.2
## 28 170360 uc061ymb.1
## 29 170362 uc061ymd.1
## 30 170363 uc061yme.1
## 31 170364 uc061ymf.1
## 32 170366 uc061ymh.1
## 33 125566 uc002bdy.3
## 34 125567 uc059mew.1
## 35 125568 uc059mex.1
## 36 125569 uc059mez.1
## 37 76718 uc003xpj.5
## 38 76719 uc011lcw.4
## 39 76720 uc064mmy.1
## 40 76721 uc064mmz.1
## 41 76722 uc064mna.1
## 42 123436 uc021sic.3
## 43 123437 uc001zft.5
## 44 123438 uc059hdo.1
## 45 193611 uc032dkm.2
## 46 41624 uc003gva.2
## 47 41625 uc062wdd.1
## 48 41626 uc062wde.1
## 49 97393 uc001lyf.3
## 50 97394 uc057ycm.1
## 51 97395 uc057ycn.1
## 52 97396 uc057yco.1
## 53 139651 uc002ghb.4
## 54 139652 uc060apn.1
## 55 139653 uc060apo.1
## 56 139654 uc060app.1
## 57 139655 uc010vty.3
## 58 139656 uc060apq.1
## 59 139657 uc010vtz.2
## 60 139658 uc060apr.1
## 61 5240 uc001ffg.4
## 62 73614 uc064mmv.1
## 63 73615 uc064mmw.1
## 64 73616 uc003xpi.2
## 65 129025 uc002bed.2
## 66 129026 uc002bee.2
## 67 129027 uc059mfg.1
## 68 129028 uc059mfh.1
## 69 145299 uc002fzk.2
## 70 145300 uc059zxd.1
## 71 145301 uc059zxe.1
## 72 22364 uc010fyd.4
## 73 22365 uc002vsx.1
## 74 22366 uc010fye.2
## 75 22358 uc021vyi.3
## 76 22359 uc061tpi.1
## 77 22360 uc010zmg.3
## 78 22361 uc002vsw.5
## 79 22362 uc061tpj.1
## 80 22363 uc061tpk.1
dim(hschrn_txs_df)
## [1] 80 9