Bug fix for null pointer exception in AnalyzeAnnotations if -name argument isn't specified

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2828 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
rpoplin 2010-02-11 18:39:26 +00:00
parent ad608d0e9d
commit ecebf0bc62
2 changed files with 5 additions and 4 deletions

View File

@ -68,8 +68,6 @@ public class AnalyzeAnnotationsWalker extends RodWalker<Integer, Integer> {
@Argument(fullName = "indicate_mean_num_vars", shortName = "meanNumVars", doc = "If supplied, plots will indicate the distribution of number of variants instead of distribution of value of annotation", required = false)
private boolean INDICATE_MEAN_NUM_VARS = false;
/////////////////////////////
// Private Member Variables
/////////////////////////////

View File

@ -141,8 +141,11 @@ public class AnnotationDataManager {
// Close the PrintStream
output.close();
String annotationName = nameMap.get(annotationKey);
String annotationName = null;
if( nameMap != null ) {
annotationName = nameMap.get(annotationKey);
}
if( annotationName == null ) { // This annotation is not in the name map so use the key instead
annotationName = annotationKey;
}