public void Herd()
{
// Keep track of how long the hoarding takes
_startTime = DateTime.Now;
try
{
// 1) Get the unique peptides from all csv files
Peptides = GetAllUniquePeptides(CsvFiles);
// 2) Digest Proteins in the Fasta and compare with the Unique Peptides
List<Protein> proteins = GetMappedProteinsFromFasta(FastaFile, Peptides, Proteases.ToList(), SemiDigestion);
// 3) Group the proteins together into protein groups
_proteinGroups = GroupProteins(proteins);
// 4) Groups the proteins to experiments
Dictionary<string, ExperimentGroup> expgroups = GroupExperiments(CsvFiles, UseQuant);
// 5) Write out the peptide level data
WritePeptides(expgroups, OutputDirectory);
// 6) Write out the peptide level data
WriteGroups(expgroups, OutputDirectory);
// 7) Write out the summary document
if (DuplexQuantitation)
WriteSummary(expgroups, OutputDirectory);
// 8) Write the proteins per minute file
if (ProteinsPerMinute)
WriteProteinsPerMinute(Peptides.Values.ToList(), proteins, OutputDirectory);
// 9) Write the sequence maps out
if (SequenceCoverageMap)
{
WriteSequenceMaps(_proteinGroups, OutputDirectory);
ExtraInfo(_proteinGroups, OutputDirectory);
}
}
catch (Exception e)
{
Log("[ERROR]\t{0}", e.Message);
}
finally
{
CleanUp();
}
}