# HG changeset patch
# User davidvanzessen
# Date 1447166409 18000
# Node ID 5806aed6ddeca5f7bb86c6090a56fa682e31978b
# Parent c28f4a0ae062b610d2713e42e72788e18af52ac5
Uploaded
diff -r c28f4a0ae062 -r 5806aed6ddec OMT_coding_old.txt
--- a/OMT_coding_old.txt Thu Oct 29 09:35:50 2015 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-ID name
1 1. Malformation
2 2. Deformation
3 3. Dysplasia
11 1A. Entire limb malformations
12 1B. Handplate malformations
21 Constriction ring sequence
22 Trigger digits
31 3A. Hypertrophy
32 3B. Tumorous conditions
110 1A. NOS entire limb malformation
111 1A1. Proximal-distal axis (entire limb)
112 1A2. Radio-ulnar axis (entire limb)
113 1A3. Dorso-ventral axis (entire limb)
114 1A4. Unspecified axis (entire limb)
120 1B. NOS handplate malformation
121 1B1. Proximal-distal axis (hand)
122 1B2. Radio-ulnar axis (hand)
123 1B3. Dorso-ventral axis (hand)
124 1B4. Unspecified axis (hand)
210 Constriction ring sequence
220 Trigger digits
311 3A1. Whole limb hypertrophy
312 3A2. Partial Limb hypertrophy
321 3B1. Vascular tumors
324 3B4. Skeletal tumors
1100 1A. NOS malformation (entire limb)
1110 1A1. NOS prox-distal axis (entire limb)
1111 1A1i. Brachymelia
1112 1A1ii. Symbrachydactyly
1113 1A1iii. Transverse deficiency
1114 1A1iv. Intersegmental deficiency
1115 1A1v. Limb duplication
1120 1A2. NOS rad-uln axis (entire limb)
1121 1A2i. Radial longitudinal deficiency
1122 1A2ii. Ulnar longitudinal deficiency
1124 1A2iv. Radioulnar synostosis
1125 1A2v. Congenital radial head dislocation
1126 1A2vi. Humeroradial synostosis
1127 1A2vii. Madelung deformity
1131 1A3i. Dorsal dimelia (palmar nail)
1132 1A3ii. Ventral dimelia
1141 1A4i. Abberant shoulder (incl Sprengel deformity)
1142 1A4ii. Arthrogryposis
1200 1B. NOS malformation (hand)
1211 1B1i. Brachydactyly
1213 1B1iii. Transverse deficiency (no arm involvement)
1220 1B2. NOS rad-uln axis malformation (hand)
1221 1B2i. Radial deficiency of the hand
1222 1B2ii. Ulnar deficiency of the hand
1223 1B2iii. Radial polydactyly
1224 1B2iv. Triphalangeal thumb
1225 1B2v. Ulnar dimelia
1226 1B2vi. Ulnar polydactyly
1232 1B3ii. Ventral dimelia (incl hypoplastic/aplastic nail)
1241 1B4i. Softi tissue malformations
1242 1B4ii. Sekeltal deficiencies
1243 1B4iii. Complex anomalies of unspecified axis (hand)
2100 Constriction ring sequence
2200 Trigger digits
3111 3A1i. Hemihypertrophy
3121 3A2i. Macrodactyly
3211 3B1i. Hemangioma
3212 3B1ii. Vascular malformation
3241 3B4i. Osteochondromatosis
3242 3B4ii. Echondromatosis
3244 3B4iv. Epiphyseal abnormalities
11000 1A. NOS entire limb malformation
11100 1A1. NOS proximal-distal axis malformation
11110 1A1i. Brachymelia
11121 1A1iia. Poland Syndrome
11130 1A1iii. Transverse deficiency
11140 1A1iv. Intersegmental deficiency
11150 1A1v. Limb duplication
11200 1A2. NOS rad-uln axis (entire limb)
11210 1A2i. Radial longitudinal deficiency
11220 1A2ii. Ulnar longitudinal deficiency
11240 1A2iv. Radioulnar synostosis
11250 1A2v. Congenital radial head dislocation
11260 1A2vi. Humeroradial synostosis
11270 1A2vii. Madelung deformity
11310 1A3i. Dorsal dimelia (palmar nail)
11320 1A3ii. Ventral dimelia
11411 1A4ia. Sprengel deformity
11412 1A4ib. Abnormal shoulder muscles
11413 1A4ic. NOS shoulder malformation
11420 1A4ii. Arthrogryposis
12000 1B. NOS handplate malformation
12110 1B1i. Brachydactyly
12130 1B1iii. Transverse deficiency (no arm involvement)
12200 1B2. NOS rad-uln axis malformation (hand)
12210 1B2i. Radial deficiency of the hand
12220 1B2ii. Ulnar deficiency of the hand
12230 1B2iii. Radial polydactyly
12240 1B2iv. Triphalangeal thumb
12250 1B2v. Ulnar dimelia
12260 1B2vi. Ulnar polydactyly
12320 1B3ii. Ventral dimelia (incl hypoplastic/aplastic nail)
12411 1B4ia. Syndactyly
12412 1B4ib. Camptodactyly
12413 1B4ic. Thumb in palm deformity
12414 1B4id. Distal arthrogryposis
12421 1B4iia. Clinodactyly
12423 1B4iib. Synostosis/symphalangism
12431 1B4iiia. Complex syndactyly
12432 1B4iiib. Synpolydactyly
12433 1B4iiic. Cleft Hand
12434 1B4iiid. Apert Hand
21000 Constriction ring sequence
22000 Trigger digits
31110 3A1i. Hemihypertrophy
31210 3A2i. Macrodactyly
32110 3B1i. Hemangioma
32120 3B1ii. Vascular malformation
32410 3B4i. Osteochondromatosis
32420 3B4ii. Echondromatosis
32440 3B4iv. Epiphyseal abnormalities
\ No newline at end of file
diff -r c28f4a0ae062 -r 5806aed6ddec phenotype_gene_relations_plot.r
--- a/phenotype_gene_relations_plot.r Thu Oct 29 09:35:50 2015 -0400
+++ b/phenotype_gene_relations_plot.r Tue Nov 10 09:40:09 2015 -0500
@@ -10,7 +10,7 @@
omt4=strsplit(args[5], ",")[[1]]
omt5=strsplit(args[6], ",")[[1]]
inheritance=strsplit(args[7], ",")[[1]]
-orderby=as.numeric(args[8])
+orderby.list=as.character(args[8])
outdir=args[9]
dat = read.table(input, header=T, sep="\t", comment.char="#", quote = "")
@@ -57,11 +57,24 @@
dat.sub2 = dat.sub2[!duplicated(dat.sub2),]
-dat.sub2.order = dat.sub2[dat.sub2$GROUP.CODE == orderby,c("disease.gene", "ratio")]
+dat.sub2$disease.gene.order = dat.sub2$ratio
+for(orderby in strsplit(orderby.list, ",")[[1]]){
+ filter = dat.sub2$GROUP.CODE == as.numeric(orderby)
+ print(paste("orderby:",orderby, "+1:", sum(filter)))
+ if(sum(filter) > 0){
+ dat.sub2[filter,"disease.gene.order"] = dat.sub2[filter,"disease.gene.order"] + max(dat.sub2$ratio)
+ }
+}
-names(dat.sub2.order) = c("disease.gene", "disease.gene.order")
+dat.sub2[dat.sub2$disease.gene.order < max(dat.sub2$ratio),"disease.gene.order"] = 0
+
+write.table(dat.sub2[,c("disease.gene", "GROUP.CODE", "GROUP.NAME", "ratio", "disease.gene.order")], "debug.txt", quote=F, sep="\t", row.names=F, col.names=T)
-dat.sub2 = merge(dat.sub2, dat.sub2.order, by="disease.gene", all=T)
+#dat.sub2.order = dat.sub2[dat.sub2$GROUP.CODE == orderby,c("disease.gene", "ratio")]
+
+#names(dat.sub2.order) = c("disease.gene", "disease.gene.order")
+
+#dat.sub2 = merge(dat.sub2, dat.sub2.order, by="disease.gene", all=T)
p = ggplot(dat.sub2, aes(reorder(disease.gene, -disease.gene.order), reorder(GROUP.NAME, as.numeric(GROUP.CODE)))) + geom_tile(aes(fill = ratio), colour = "white") + scale_fill_gradient(low = "white",high = "red")
@@ -98,7 +111,7 @@
#order the table the same as the first plot x axis
disease.gene.url = dat[OMTs & disease.in.omt & inheritance.filter ,c("disease.gene", "diseaseId", "gene.symbol", "url")]
disease.gene.url = disease.gene.url[!duplicated(disease.gene.url),]
-disease.gene.url = merge(disease.gene.url, dat.sub2.order, by="disease.gene")
+disease.gene.url = merge(disease.gene.url, dat.sub2[,c("disease.gene", "disease.gene.order")], by="disease.gene")
disease.gene.url = disease.gene.url[order(-disease.gene.url$disease.gene.order),]
disease.gene.url = disease.gene.url[,c("diseaseId", "gene.symbol", "url")]
diff -r c28f4a0ae062 -r 5806aed6ddec phenotype_gene_relations_plot.xml
--- a/phenotype_gene_relations_plot.xml Thu Oct 29 09:35:50 2015 -0400
+++ b/phenotype_gene_relations_plot.xml Tue Nov 10 09:40:09 2015 -0500
@@ -169,7 +169,7 @@
-
+