Browse code

legend paramaters can be set if they are only subset of all annotations

git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ComplexHeatmap@111682 bc3139a8-67e5-0310-9ffc-ced21a209358

z.gu authored on 20/12/2015 21:19:41
Showing 1 changed files

... ...
@@ -132,7 +132,9 @@ HeatmapAnnotation = function(df, name, col,
132 132
 
133 133
 			names(lp) = simple_anno_name
134 134
 			for(i in seq_along(lp)) {
135
-				lp[[i]] = annotation_legend_param[[i]]
135
+				if(names(lp)[i] %in% names(annotation_legend_param)) {
136
+					lp[[i]] = annotation_legend_param[[names(lp)[i]]]
137
+				}
136 138
 			}
137 139
 			annotation_legend_param = lp
138 140
 		} else {