<commit_before>package gov.nih.nci.caintegrator.analysis.messaging;

import gov.nih.nci.caintegrator.enumeration.CoVariateType;
import gov.nih.nci.caintegrator.enumeration.MultiGroupComparisonAdjustmentType;
import gov.nih.nci.caintegrator.enumeration.StatisticalMethodType;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class GeneralizedLinearModelRequest extends AnalysisRequest implements Serializable {	
	
	private static final long serialVersionUID = 1L;
	private StatisticalMethodType statisticalMethod;
	private CoVariateType coVariateType;
	private List<CoVariateType> coVariateTypes = new ArrayList<CoVariateType>();
	private MultiGroupComparisonAdjustmentType multiGrpComparisonAdjType = MultiGroupComparisonAdjustmentType.NONE;	
	private SampleGroup group1 = null;
	private SampleGroup baselineGroup = null;
	private double foldChangeThreshold = Double.NEGATIVE_INFINITY;
	private double pValueThreshold = Double.POSITIVE_INFINITY;
	
	// TODO: need to come back to do array platform
	
	public GeneralizedLinearModelRequest(String sessionid, String taskId) {
		super(sessionid, taskId);
	}
	public SampleGroup getBaselineGroup() {
		return baselineGroup;
	}
	public void setBaselineGroup(SampleGroup baselineGroup) {
		this.baselineGroup = baselineGroup;
	}
	public CoVariateType getCoVariateType() {
		return coVariateType;
	}
	public void setCoVariateType(CoVariateType coVariateType) {
		this.coVariateType = coVariateType;
	}
	public List<CoVariateType> getCoVariateTypes() {
		return coVariateTypes;
	}
	public void setCoVariateTypes(List<CoVariateType> coVariateTypes) {
		this.coVariateTypes = coVariateTypes;
	}
	public double getFoldChangeThreshold() {
		return foldChangeThreshold;
	}
	public void setFoldChangeThreshold(double foldChangeThreshold) {
		this.foldChangeThreshold = foldChangeThreshold;
	}
	public SampleGroup getGroup1() {
		return group1;
	}
	public void setGroup1(SampleGroup group1) {
		this.group1 = group1;
	}
	public MultiGroupComparisonAdjustmentType getMultiGrpComparisonAdjType() {
		return multiGrpComparisonAdjType;
	}
	public void setMultiGrpComparisonAdjType(
			MultiGroupComparisonAdjustmentType multiGrpComparisonAdjType) {
		this.multiGrpComparisonAdjType = multiGrpComparisonAdjType;
	}
	public double getPValueThreshold() {
		return pValueThreshold;
	}
	public void setPValueThreshold(double valueThreshold) {
		pValueThreshold = valueThreshold;
	}
	public StatisticalMethodType getStatisticalMethod() {
		return statisticalMethod;
	}
	public void setStatisticalMethod(StatisticalMethodType statisticalMethod) {
		this.statisticalMethod = statisticalMethod;
	}
	
	@Override
	public String toString() {
		 int blGroupSize = -1;
		  if (baselineGroup!=null) {
		    blGroupSize = baselineGroup.size();
		  }
		  
		  int group1Size = -1;
		  if (group1 !=null) {
		    group1Size = group1.size();
		  }
			
		  String retStr = "GLMTestRequest: sessionId=" + getSessionId() + " taskId=" + getTaskId() + " blGroupSize=" + blGroupSize + " group1Szie=" + group1Size;
		  
		  if (group1 != null) { 
		    retStr += " GRP1=" + group1.getGroupName();
		  }
		  
		  if (baselineGroup != null) {
		    retStr += " baselineGroup=" + baselineGroup.getGroupName();
		  }
		  
		  return retStr;
	}
	

}<commit_msg>added call to wei's glm function<commit_after>package gov.nih.nci.caintegrator.analysis.messaging;

import gov.nih.nci.caintegrator.enumeration.CoVariateType;
import gov.nih.nci.caintegrator.enumeration.MultiGroupComparisonAdjustmentType;
import gov.nih.nci.caintegrator.enumeration.StatisticalMethodType;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class GeneralizedLinearModelRequest extends AnalysisRequest implements Serializable {	
	
	private static final long serialVersionUID = 1L;
	private StatisticalMethodType statisticalMethod;
	private CoVariateType coVariateType;
	private List<CoVariateType> coVariateTypes = new ArrayList<CoVariateType>();
	private MultiGroupComparisonAdjustmentType multiGrpComparisonAdjType = MultiGroupComparisonAdjustmentType.NONE;	
	private List<SampleGroup>  comparisonGroups =  Collections.emptyList();;
	private SampleGroup baselineGroup = null;
	private double foldChangeThreshold = Double.NEGATIVE_INFINITY;
	private double pValueThreshold = Double.POSITIVE_INFINITY;
	
	// TODO: need to come back to do array platform
	
	public GeneralizedLinearModelRequest(String sessionid, String taskId) {
		super(sessionid, taskId);
	}
	public SampleGroup getBaselineGroup() {
		return baselineGroup;
	}
	public void setBaselineGroup(SampleGroup baselineGroup) {
		this.baselineGroup = baselineGroup;
	}
	public CoVariateType getCoVariateType() {
		return coVariateType;
	}
	public void setCoVariateType(CoVariateType coVariateType) {
		this.coVariateType = coVariateType;
	}
	public List<CoVariateType> getCoVariateTypes() {
		return coVariateTypes;
	}
	public void setCoVariateTypes(List<CoVariateType> coVariateTypes) {
		this.coVariateTypes = coVariateTypes;
	}
	public double getFoldChangeThreshold() {
		return foldChangeThreshold;
	}
	public void setFoldChangeThreshold(double foldChangeThreshold) {
		this.foldChangeThreshold = foldChangeThreshold;
	}

	public MultiGroupComparisonAdjustmentType getMultiGrpComparisonAdjType() {
		return multiGrpComparisonAdjType;
	}
	public void setMultiGrpComparisonAdjType(
			MultiGroupComparisonAdjustmentType multiGrpComparisonAdjType) {
		this.multiGrpComparisonAdjType = multiGrpComparisonAdjType;
	}
	public double getPValueThreshold() {
		return pValueThreshold;
	}
	public void setPValueThreshold(double valueThreshold) {
		pValueThreshold = valueThreshold;
	}
	public StatisticalMethodType getStatisticalMethod() {
		return statisticalMethod;
	}
	public void setStatisticalMethod(StatisticalMethodType statisticalMethod) {
		this.statisticalMethod = statisticalMethod;
	}
	
	@Override
	public String toString() {
		 int blGroupSize = -1;
		  if (baselineGroup!=null) {
		    blGroupSize = baselineGroup.size();
		  }
		  
			
		  String retStr = "GLMTestRequest: sessionId=" + getSessionId() + " taskId=" + getTaskId() + " blGroupSize=" + blGroupSize ;
		  
		  
		  if (baselineGroup != null) {
		    retStr += " baselineGroup=" + baselineGroup.getGroupName();
		  }
          for (SampleGroup sg : comparisonGroups) {
                retStr += " group=" + sg.getGroupName() + " size=" + sg.size();
          }          
		  
		  return retStr;
	}
    public List<SampleGroup> getComparisonGroups() {
        return comparisonGroups;
    }
    public void setComparisonGroups(List<SampleGroup> comparisonGroups) {
        this.comparisonGroups = comparisonGroups;
    }

	

}
{'fraction_non_alphanumeric': 0.07937915742793791, 'fraction_numerical': 0.0031042128603104213, 'mean_word_length': 5.112014453477868, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3406687', 'n_tokens_mistral': 2169, 'n_tokens_neox': 1974, 'n_words': 416}