Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengxwen committed Apr 4, 2015
1 parent a0ac2ce commit f97a38a
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 7 deletions.
11 changes: 10 additions & 1 deletion R/DataUtilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@
if (num > 1) "s" else ""
}

.strbp <- function(bp)
{
if (is.na(bp) | !is.finite(bp))
"unknown"
else
paste(bp, "bp", sep="")
}

#######################################################################
# get the name of HLA gene
#
Expand Down Expand Up @@ -1645,7 +1653,8 @@ summary.hlaAlleleClass <- function(object, show=TRUE, ...)
if (show)
{
cat("Gene: ", .hla_gene_name_string(hla$locus), "\n", sep="")
cat(sprintf("Range: [%dbp, %dbp]", hla$pos.start, hla$pos.end))
cat(sprintf("Range: [%s, %s]",
.strbp(hla$pos.start), .strbp(hla$pos.end)))
if (!is.null(hla$assembly))
cat(" on ", hla$assembly, "\n", sep="")
else
Expand Down
31 changes: 29 additions & 2 deletions inst/doc/GeneInfo_hg19.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ C 6 31236526 31239913
E 6 30457183 30461982
F 6 29691117 29695073
G 6 29794756 29798899
H 6 29855383 29858856
J 6 29973748 29977733
K 6 29894436 29897616
L 6 30227339 30234728
N 6 30318851 30319815
P 6 29767821 29770856
S 6 31349346 31350264
T 6 29864220 29866724
U 6 29901541 29902657
V 6 29759530 29760527
W 6 29923611 29926835
X 6 31429623 31430267
Z 6 32864179 32864266
C4A 6 31949834 31970457
C4B 6 31982572 32003195
DMA 6 32916391 32920900
DMB 6 32902406 32908847
DOA 6 32971959 32977389
Expand All @@ -15,14 +30,26 @@ DRA 6 32407619 32412823
DRB1 6 32546546 32557613
DRB5 6 32485151 32498006
DQA1 6 32605169 32612152
DQA2 6 32709156 32714664
DQB1 6 32627241 32634466
DQB2 6 32723837 32731330
DPA1 6 33032346 33048555
DPA2 6 33059259 33061091
DPA3 6 33098974 33099120
DPB1 6 33043703 33057473
C4A 6 31949834 31970457
C4B 6 31982572 32003195
DPB2 6 33080293 33096890
MICA 6 31367561 31383090
MICB 6 31462054 31478901
MICC 6 30382490 30387543
MICD 6 29938149 29943522
MICE 6 29709234 29716880
HSPA1A 6 31782952 31785719
HSPA1B 6 31789964 31798032
HSPA1L 6 31777396 31790093
LTA 6 31539876 31542101
LTB 6 31548335 31550202
PSMB8 6 32808494 32812712
PSMB9 6 32821927 32827628
TAP1 6 32812986 32821748
TAP2 6 32789610 32806547
TNF 6 31543344 31546113
33 changes: 30 additions & 3 deletions inst/doc/GeneInfo_hg20.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,49 @@ C 6 31268749 31272136
E 6 30489406 30494205
F 6 29723340 29727296
G 6 29826979 29831122
H 6 29887760 29891080
J 6 30005971 30009956
K 6 29926659 29929839
L 6 30259562 30266951
N 6 30351074 30352038
P 6 29800044 29803079
S 6 31381569 31382487
T 6 29896443 29898947
U 6 29933764 29934880
V 6 29791753 29792750
W 6 29955834 29959058
X 6 31461846 31462490
Z 6 32896402 32896489
C4A 6 31982057 32002680
C4B 6 32014795 32035418
DMA 6 32948614 32953122
DMB 6 32934629 32941070
DOA 6 33004182 33009612
DOB 6 32812763 32817048
DRA 6 32439842 32445046
DRB1 6 32578769 32589836
DRB5 6 32517374 32530229
DQA1 6 32637392 32654685
DQA1 6 32637396 32654774
DQA2 6 32741386 32746887
DQB1 6 32659464 32666689
DQB2 6 32756094 32763553
DPA1 6 33064569 33080778
DPA2 6 33091482 33093314
DPA3 6 33131197 33131343
DPB1 6 33075926 33089696
C4A 6 31982057 32002680
C4B 6 32014795 32035418
DPB2 6 33112516 33129113
MICA 6 31399784 31415315
MICB 6 31494277 31511124
MICC 6 30414713 30419766
MICD 6 29970372 29975745
MICE 6 29741457 29749103
HSPA1A 6 31815514 31817942
HSPA1B 6 31827735 31830254
HSPA1L 6 31809619 31821040
LTA 6 31572099 31574324
LTB 6 31580558 31582425
PSMB8 6 32840717 32844935
PSMB9 6 32854161 32859851
TAP1 6 32845209 32853971
TAP2 6 32821833 32838823
TNF 6 31575567 31578336
3 changes: 2 additions & 1 deletion man/hlaLociInfo.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ hlaLociInfo(assembly=c("auto", "auto-silent", "hg18", "hg19", "hg20",
}

\references{
NCBI Resources: \url{http://www.ncbi.nlm.nih.gov/gene}
NCBI Resources: \url{http://www.ncbi.nlm.nih.gov/gene},
HLA Nomenclature: \url{http://hla.alleles.org/genes/index.html}
}
\author{Xiuwen Zheng}

Expand Down

0 comments on commit f97a38a

Please sign in to comment.