Ejemplo n.º 1
0
        public void TestGetReversedSequence()
        {
            var options = new ReversedDatabaseBuilderOptions()
            {
                DecoyKey = "REVERSED",
            };
            var builder = new ReversedDatabaseBuilder(options);

            var seq = new Sequence("sp|Q12345 sp protein", "ABCDE");

            options.DecoyType = DecoyType.Start;
            Assert.AreEqual("REVERSED_sp|Q12345", builder.GetReversedSequence(1, seq).Name);

            options.DecoyType = DecoyType.Middle;
            Assert.AreEqual("sp|REVERSED_Q12345", builder.GetReversedSequence(1, seq).Name);
        }
Ejemplo n.º 2
0
        protected override IProcessor GetProcessor()
        {
            var options = new ReversedDatabaseBuilderOptions()
            {
                ReversedOnly      = reversedOnly.Checked,
                IsPseudoAminoacid = isPseudoAminoacid.Checked,
                PseudoAminoacids  = pseudoAminoacids.Text,
                IsPseudoForward   = isPseudoForward.SelectedIndex == 0,
                ContaminantFile   = includeContaminantProteins.Checked ? contaminantFile.FullName : string.Empty,
                InputFile         = sourceDatabase.FullName,
                DecoyType         = decoyTypes.SelectedItem
            };

            if (!options.PrepareOptions())
            {
                throw new ArgumentException(options.ParsingErrors.Merge("\n"));
            }
            else
            {
                return(new ReversedDatabaseBuilder(options));
            }
        }
Ejemplo n.º 3
0
 public ReversedDatabaseBuilder(ReversedDatabaseBuilderOptions options)
 {
     this.options = options;
 }