static void Main(string[] args) { var options = new ParseCommandLine(); if (CommandLine.Parser.Default.ParseArguments(args, options)) { Console.WriteLine("Starting Program."); SQLiteConnector newConnection = new SQLiteConnector(options);//.ToFile(); // this creates a new SortPairs and outputs the info to file/ Console.WriteLine("Finished. Press any key to exit"); } }
public void MakeAllCombinations() { Stopwatch time = new Stopwatch(); time.Start(); ulong count = 0; for (int i = 0; i < inputs.Count - 1; i++)// prsmFile used to be a List<PrSmAndFile> { for (int j = i + 1; j < inputs.Count; j++) { count++; if (count % 100000000 == 0) // only output every 100 million lines { Console.WriteLine("Processed: " + count + ", Elapsed Time: " + time.ElapsedMilliseconds); } var left = inputs[i]; // this is one object var right = inputs[j]; // this is the second object for comparison if (filterForPeptideLength(left.peptide, right.peptide) != true) { continue; } if (filterForSameCharge(left.charge, right.charge) != true) { continue; } if (filterForBeginningOrEndMatch(left.peptide, right.peptide) != true) { continue; } if (filterForOrganismMatch(left.organismName, right.organismName) != true) { continue; } //later use actual org name, not codex var tableAppendix = ComputeLevenshteinDistance.LevenshteinDistance(left.peptide, right.peptide); string valuesForPairsTable = "('" + left.id + "','" + right.id + "','" + tableAppendix + "')"; if (tableAppendix < 3) { aggregateValuesForPairsTable.Add(valuesForPairsTable); } if (aggregateValuesForPairsTable.Count >= 800 && aggregateValuesForPairsTable.Count > 0) { SQLiteConnector.FillDatabase(string.Join(",", aggregateValuesForPairsTable.ToArray())); aggregateValuesForPairsTable = new List <string>(); } } } }