internal SelectomeGene(Dictionary <SelectomeTaxaGroup, SelectomeQuerySubResult> initiatingResults, string label) { if (!initiatingResults.ContainsKey(SelectomeTaxaGroup.Euteleostomi)) { throw new FormatException("Could not parse the vertebrate group data from the XML received from selectome.\n"); } this.Label = label; this.vetebrateQueryResult = initiatingResults[SelectomeTaxaGroup.Euteleostomi]; }
internal SelectomeGene(Dictionary<SelectomeTaxaGroup,SelectomeQuerySubResult> initiatingResults, string label) { if (!initiatingResults.ContainsKey(SelectomeTaxaGroup.Euteleostomi)) { throw new FormatException("Could not parse the vertebrate group data from the XML received from selectome.\n"); } this.Label = label; this.vetebrateQueryResult = initiatingResults[SelectomeTaxaGroup.Euteleostomi]; }
/// <summary> /// Parses one line from the note section of the XML into a SelectomeResultObject /// </summary> /// <param name="data"></param> /// <returns></returns> private static SelectomeQuerySubResult ProcessSelectomeData(string data) { //First assign taxa to a group SelectomeTaxaGroup group = SelectomeTaxaGroup.NotSet; foreach (var kv in SelectomeConstantsAndEnums.GroupToNameList) { if (data.Contains(kv.Value)) { group = kv.Key; break; } } //Now determine if positive seleciton has occurred. bool positiveSelectionSignature = false; if (data.Contains("Positive selection found")) { positiveSelectionSignature = true; } else if (data.Contains("No positive selection found")) { positiveSelectionSignature = false; } else if (data.Contains("Branch(es) under positive selection BUT no site found")) { positiveSelectionSignature = true; } else { throw new FormatException("Could not determine whether gene was under positive selection.\n XML was:" + data); } var result = new SelectomeQuerySubResult(group, positiveSelectionSignature); return(result); }
/// <summary> /// Parses one line from the note section of the XML into a SelectomeResultObject /// </summary> /// <param name="data"></param> /// <returns></returns> private static SelectomeQuerySubResult ProcessSelectomeData(string data) { //First assign taxa to a group SelectomeTaxaGroup group=SelectomeTaxaGroup.NotSet; foreach(var kv in SelectomeConstantsAndEnums.GroupToNameList) { if(data.Contains(kv.Value)) { group=kv.Key; break; } } //Now determine if positive seleciton has occurred. bool positiveSelectionSignature = false; if (data.Contains("Positive selection found")) { positiveSelectionSignature = true; } else if (data.Contains("No positive selection found")) { positiveSelectionSignature = false; } else if (data.Contains("Branch(es) under positive selection BUT no site found")) { positiveSelectionSignature=true; } else { throw new FormatException("Could not determine whether gene was under positive selection.\n XML was:" + data); } var result = new SelectomeQuerySubResult(group,positiveSelectionSignature); return result; }