public static void MergeUbiSites(string csvFileA, string csvFileB, string csvOut)
        {
            int[]       ubiPos  = new int[] { 34, 36, 38, 40, 42, 44 };
            vsCSV       csvA    = new vsCSV(csvFileA);
            vsCSV       csvB    = new vsCSV(csvFileB);
            vsCSVWriter writer  = new vsCSVWriter(csvOut);
            int         posUbiA = -1;
            int         posUbiB = -1;

            foreach (string lineA in csvA.LINES_LIST)
            {
                string[] splitsA = lineA.Split(vsCSV._Generic_Separator);
                foreach (int indexUbiPos in ubiPos)
                {
                    if (splitsA.Length > indexUbiPos && int.TryParse(splitsA[indexUbiPos], out posUbiA))
                    {
                        foreach (string lineB in csvB.LINES_LIST)
                        {
                            string[] splitsB = lineB.Split(vsCSV._Generic_Separator);

                            if (splitsB.Length > indexUbiPos && int.TryParse(splitsB[indexUbiPos], out posUbiB))
                            {
                                if (splitsA[3].CompareTo(splitsB[3]) == 0 && posUbiA == posUbiB)
                                {
                                    writer.AddLine(splitsA[3] + "," + vsCSV.GetFileName_NoExtension(csvFileA) + "," + splitsA[13] + "," +
                                                   vsCSV.GetFileName_NoExtension(csvFileB) + "," + splitsB[13] + "," +
                                                   posUbiA + "," + splitsA[indexUbiPos + 1]);
                                }
                            }
                        }
                    }
                }
            }
            writer.WriteToFile();
        }
        }//*/

        public static void LIR(string fasta, string csvOut)
        {
            vsCSVWriter writer = new vsCSVWriter(csvOut);

            foreach (string[] protein in Fasta.FastaRead.GetSequences(fasta))
            //string header = "Known LIR";
            //foreach (string sequence in LIR_Peptides)
            {
                string header   = protein[0];
                string sequence = protein[1];

                //if("W/F/Y" && pos+2 == "L/I/V" && "Enough E,D,S or T at +1 to -3")
                for (int i = 2; i + 3 < sequence.Length; i++)
                {
                    if (Score_LIR(sequence, i))
                    {
                        //double score = Score_LIR(sequence, i);
                        //int nbDest = NbDEST(sequence, i);
                        //if (score >= 2.6 && nbDest >= 3 && nbDest <= 7)
                        //{
                        writer.AddLine('"' + header + "\"," + i + "," + sequence.Substring(Math.Max(i - 9, 0), Math.Min(12, sequence.Length - Math.Max(i - 9, 0))) + "," + NbDEST(sequence, i));
                    }
                }
            }
            writer.WriteToFile();
        }
        public static void ScoreSequences(string csvFileOut)
        {
            vsCSVWriter writer = new vsCSVWriter(csvFileOut);

            foreach (string motif in GetAllLIRSequences("DESTx", "WFY", "LIV", 12, ""))
            {
                double score = 0;
                foreach (string lir in LIR_Peptides)
                {
                    for (int i = 0; i < LIR_Peptides.Length; i++)
                    {
                        if (lir[i] == motif[i] || motif[i] == 'x')
                        {
                            score += 1;
                        }
                    }
                }
                if (score > 2)
                {
                    writer.AddLine(motif + "," + score);
                }
            }
            writer.WriteToFile();
        }