public SgMutantProfileVmImpl(ISgMutantProfile sgMutantProfile) { _sgMutantProfile = sgMutantProfile; _report = JsonConvert.SerializeObject( _sgMutantProfile.Scores.GroupBy(s => s) .OrderBy(g => g.Key) .Select(g => new[] { g.Key, g.Count() }) .ToList() ); _parentGuid = _sgMutantProfile.ParentGenomeEval.Guid; _averageScore = _sgMutantProfile.Scores.Average(); }
public static ISgMutantProfileVm ToSgMutantProfileVm(this ISgMutantProfile sgMutantProfile) { return(new SgMutantProfileVmImpl(sgMutantProfile)); }