Beispiel #1
0
        public ActionResult PhredValidation()
        {
            // 2013-01-18 by kjt: Added additional check to exclude non-sequencing jobs from barcodes requiring validation.
            //var barcodes = _repositoryFactory.BarcodeFileRepository.Queryable.Where(a => a.Uploaded && !a.Validated).Select(a => a.Barcode.Id).Distinct();
            var barcodes = _repositoryFactory.BarcodeFileRepository.Queryable.Where(a => a.Uploaded && !a.Validated && a.Barcode.UserJobPlate.UserJob.JobType.HasSequencing).Select(a => a.Barcode.Id).Distinct();
            // For some reason there are zero barcodes after phred has been run, so
            // let's try saving the count prior to running the validation.
            var barcodeCount = barcodes.Count();

            foreach (var bc in barcodes)
            {
                _phredService.ExecuteValidation(bc);
            }

            Message = string.Format("Validation for {0} barcode(s) has been run.", barcodeCount);
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        public JsonNetResult RunValidation(int id)
        {
            _phredService.ExecuteValidation(id);

            return(new JsonNetResult(true));
        }