public override bool PrepareOptions() { if (!string.IsNullOrWhiteSpace(ContaminantFile) && !File.Exists(ContaminantFile)) { ParsingErrors.Add(string.Format("Contaminant file not exists: {0}", ContaminantFile)); } if (!File.Exists(InputFile)) { ParsingErrors.Add(string.Format("Input file not exists: {0}", InputFile)); } if (string.IsNullOrWhiteSpace(this.OutputFile)) { if (ReversedOnly) { OutputFile = FileUtils.ChangeExtension(InputFile, this.DecoyKey + "_ONLY.fasta"); } else { OutputFile = FileUtils.ChangeExtension(InputFile, this.DecoyKey + ".fasta"); } } if (IsPseudoAminoacid) { PseudoAminoacidBuilder = new PseudoSequenceBuilder(PseudoAminoacids, IsPseudoForward); } return(ParsingErrors.Count == 0); }
public ReversedDatabaseBuilderOptions() { ReversedOnly = false; IsPseudoAminoacid = true; PseudoAminoacids = "KR"; IsPseudoForward = false; ContaminantFile = string.Empty; PseudoAminoacidBuilder = null; this.DecoyKey = "REVERSED"; this.DecoyType = DecoyType.Start; }