/// <summary> /// Reads rna, peptide Fasta-Sequence(s) and generates HELMNotation /// </summary> /// <param name="fastaString"></param> /// <returns></returns> public static string FastaToHelm(string fastaString) { string helm = null; string errorMsg = "Can't convert FASTA to Helm"; if (UseWebEditor) { throw new InvalidCastException(errorMsg); // can't do yet } else { string helm1 = HelmService.GenerateHELMFromFastaPeptide(fastaString); if (helm1 == null) { throw new InvalidCastException(errorMsg); } string helm2 = HelmService.GenerateHELMFromFastaRNA(fastaString); if (helm2 == null) { throw new InvalidCastException(errorMsg); } if (helm1.Length >= helm2.Length) { return(helm1); } else { return(helm2); } } }
public static string FastaPeptideToHelm(string fastaString) { string helm = HelmService.GenerateHELMFromFastaPeptide(fastaString); return(helm); }