Exemple #1
0
        public void twofile()
        {
            // driver function for two files
            x = new Filemanager();
            y = new Filemanager();

            one = x.trimmerselector();
            two = y.trimmerselector();

            directa = x.directgetter();
            directb = y.directgetter();
            onea    = new StreamWriter(directa);
            twoa    = new StreamWriter(directb);
            // loops until end of file, reads 500 read blocks in two files, sends them to the trimmer and writes results.
            while (!one.EndOfStream && !two.EndOfStream)
            {
                blockreader(titleline, SequenceLine, QualityLine, one);
                blockreader(titleline2, SequenceLine2, QualityLine2, two);
                TrimmerTwoFIle();
                filesaver(titleline, SequenceLine, QualityLine, onea);
                filesaver(titleline2, SequenceLine2, QualityLine2, twoa);
            }
        }
Exemple #2
0
 public void singlefile()
 {
     // driver function for single file mode
     f       = new Filemanager();
     one     = f.trimmerselector();
     directa = f.directgetter();
     onea    = new StreamWriter(directa);
     // loops until end of file, reads 500 read blocks, sends them to the trimmer and writes results.
     while (!one.EndOfStream)
     {
         blockreader(titleline, SequenceLine, QualityLine, one);
         TrimmerOneFile();
         filesaver(titleline, SequenceLine, QualityLine, onea);
     }
     onea.Close();
     // completion message
     foreach (Window window in Application.Current.Windows)
     {
         if (window.GetType() == typeof(PreviewWindow))
         {
             (window as PreviewWindow).StatusBox.Text = (window as PreviewWindow).StatusBox.Text + "\nTrimmer complete\n";
         }
     }
 }