Top Level Namespace

Defined Under Namespace

Modules: AASM, Accession, AccessionHelper, AccessionService, Accessionable, ActsAsDescriptable, Admin, Api, ApiTools, ApplicationHelper, ArrayWithFieldList, AssetsHelper, Attributable, AuthenticatedSystem, AuthenticatedTestHelper, BarcodePrintersHelper, BatchesHelper, BootstrapHelper, BulkSubmissionExcel, CarrierWave, Cherrypick, CherrypickFormHelper, Commentable, CommentsProxy, CompoundSampleHelper, ControlRequestTypeCreation, ControllerHelper, CronScripts, CsvParserClient, DataRelease, DelayedJobsHelper, DelegateValidation, Deployed, DescriptorJavascriptHelper, Dev, EBICheck, EncodingDetector, EventfulRecord, FieldInfosHelper, FlashTruncation, FontawesomeHelper, HTTPClients, HasBehaviour, HasPolyMetadata, Heron, HistoriesHelper, IncludeTag, Informatics, Insdc, LabWhereClient, LabelPrinter, LinefeedFix, ManifestUtil, Metadata, MethodBenchmarking, NestedValidation, Parsers, PhiX, PipelinesHelper, PlatesHelper, Presenters, ProductHelpers, PrototypeReplacementHelper, RecordLoader, RemoteLinkPaginationHelper, ReportFailsHelper, RequestClassDeprecator, RequestTypePurposeCreation, RequestTypesHelper, RequestsHelper, RetentionInstructionHelper, SampleAccessioning, SampleManifestExcel, SamplesHelper, Schemas, SearchBehaviour, SequencescapeExcel, SequencingQcBatch, SharedBehaviour, SingleReceptacleLabware, Squishify, StandardNamedScopes, StateChanger, StudiesHelper, SubmissionSerializer, SubmissionsHelper, Swipecardable, TagSubstitutionHelper, Tasks, UiHelper, UnderRepWellCommentsToBroadcast, UsersHelper, Validateable, ValidationStateGuard, ViewsSchema, VolumeCheck, Warren, WorkflowsHelper, WorkingSetup Classes: Ability, AbilityAnalysis, AddSpikedInControlTask, AdminController, AdvancedSearchController, Aliquot, AliquotIndex, AliquotIndexer, ApiApplication, ApiOperation, ApiV2Generator, ApplicationController, ApplicationRecord, Asset, AssetAudit, AssetAuditsController, AssetBarcode, AssetCreation, AssetGroup, AssetGroupAsset, AssetLink, AssetShape, AssetsController, AssignTagsTask, AssignTagsToTubesTask, AssignTubesToMultiplexedWellsTask, AutomatedOrder, BaitLibrary, BaitLibraryLayout, BaitLibraryType, Barcode, BarcodePrefix, BarcodePrinter, BarcodePrinterType, BarcodePrinterType1DTube, BarcodePrinterType384DoublePlate, BarcodePrinterType384Plate, BarcodePrinterType96Plate, BarcodePrintersController, BaseLoginProxy, Batch, BatchCreationValidator, BatchRequest, BatchesController, BindingKitBarcodeTask, BioscanControlLocationsController, BroadcastEvent, BudgetDivision, BulkSubmission, BulkSubmissionsController, BulkTransfer, CherrypickForFluidigmRequest, CherrypickForPulldownPipeline, CherrypickForPulldownRequest, CherrypickPipeline, CherrypickRequest, CherrypickTask, CherrypickingPipeline, Comment, CompoundAliquot, ContentSecurityPolicyReportsController, Control, ControlPlate, ControlRequest, CreateAssetRequest, CustomMetadatum, CustomMetadatumCollection, CustomText, CustomerRequest, DataReleaseStudyType, DbFile, DeploymentEnvironment, Descriptor, DilutionPlate, DilutionPlatePurpose, Document, DocumentsController, DriverFilesController, ElementAvitiSequencingPipeline, ElementAvitiSequencingRequest, ElementAvitiValidator, Equipment, ErrorsController, Event, EventFactory, EventSender, EventfulMailer, EventsController, ExportPoolXpToTractionJob, ExtendedValidator, ExternalLibraryCreationRequest, ExternalProperty, ExternalReleaseEvent, ExtractionAttribute, FacultySponsor, Failure, FieldInfo, FlexibleCherrypickPipeline, FlexibleSubmission, FlowcellType, FlowcellTypesRequestType, FluidigmFile, FluidigmTemplateTask, Fragment, GelDilutionPlate, GelsController, GenerateCreateAssetRequestsJob, GenotypingPipeline, GenotypingRequest, GetYourQcCompletedTubesHereController, Health, HealthController, HiSeqSequencingRequest, HomesController, HttpLoginProxy, Identifier, Implement, Item, LabEvent, LabSearchesController, Labware, LabwareController, LabwhereReception, LabwhereReceptionsController, Lane, Latin1Validator, LegacyPipeline, LibPoolNormTubeGenerator, LibraryCreationRequest, LibraryEvent, LibraryTube, LibraryType, LibraryTypesRequestType, LinearSubmission, LocationReport, LocationReportJob, LocationReportsController, Lot, LotType, Map, MbraveTagsCreator, Messenger, MessengerCreator, MessengersController, MiSeqSequencingRequest, MovieLengthTask, MultiplexedCherrypickingTask, MultiplexedLibraryCreationRequest, MultiplexedLibraryTube, NotificationJob, NovaSeq6000PESequencingRequest, NovaseqxPeValidator, NullCustomMetadatumCollection, ObjectSpaceProfile, OligoEnumerator, Order, OrderCompatibilityValidator, OrderRole, OrdersController, PacBioLibraryTube, PacBioSamplePrepPipeline, PacBioSamplePrepRequest, PacBioSequencingPipeline, PacBioSequencingRequest, ParentsController, PbmcPoolingCustomerRequest, Permission, PhiXesController, PicoAssayPlate, PicoDilutionPlate, Pipeline, PipelineRequestInformationType, PipelinesController, PipelinesRequestType, Plate, PlateBarcode, PlateConversion, PlateCreation, PlateMapGeneration, PlateOwner, PlatePurpose, PlateSummariesController, PlateTemplate, PlateTemplateTask, PlateTemplatesController, PlateTransferTask, PlateType, PlateVolume, PlatesController, PlatesFromTubesController, PolyMetadatum, PolymorphicUploader, PooledCherrypickRequest, PooledPlateCreation, Pooling, PoolingSourcePlatePurpose, PoolingsController, PreCapturePool, PrepKitBarcodeTask, PrimerPanel, Product, ProductCatalogue, ProductCriteria, ProductLine, ProductProductCatalogue, Program, ProgramsValidator, Project, ProjectManager, ProjectsController, PsdFormatter, PulldownMultiplexedLibraryCreationRequest, PulldownMultiplexedLibraryTube, Purpose, QcAssay, QcDecision, QcFile, QcFilesController, QcMetric, QcMetricRequest, QcReport, QcReportJob, QcReportsController, QcRequest, QcResult, QcResultFactory, QcTube, Qcable, QcableCreator, QcableLibraryPlatePurpose, QcablePlatePurpose, QcableTubePurpose, QuadStampController, RackedTube, ReRequestSubmission, Receptacle, ReceptaclesController, ReferenceGenome, ReferenceGenomesController, ReportFail, ReportFailsController, Request, RequestEvent, RequestFactory, RequestInformation, RequestInformationType, RequestLogger, RequestType, RequestsController, Robot, RobotProperty, RobotVerificationsController, Role, Sample, SampleAccessioningJob, SampleCompoundComponent, SampleLogisticsController, SampleManifest, SampleManifestAsset, SampleManifestUploadWithTagSequencesController, SamplePrepQcTask, SampleTube, SamplesController, SangerSampleId, Search, SearchesController, SequencingPipeline, SequencingRequest, SequenomQcPlate, SequenomQcPlatesController, SessionsController, SetDescriptorsTask, SingleRequestSubmission, SpecificTubeCreation, SpecificTubeRackCreation, SpikedBuffer, Stamp, StateChange, StockLibraryTube, StockMultiplexedLibraryTube, StockStamper, StockStampersController, StripCreationRequest, StripTube, StudiesController, Study, StudyReport, StudyReportJob, StudyReportsController, StudySample, StudyType, Submission, SubmissionBuilderJob, SubmissionPool, SubmissionTemplate, SubmissionTemplateRequestType, SubmissionsController, SubmittedAsset, Supplier, SystemRequest, Tag, Tag2Layout, Tag2LayoutTemplate, TagGroup, TagGroupsController, TagGroupsTask, TagLayout, TagLayoutTemplate, TagLayoutTemplatesController, TagSet, TagSetsController, TagSubstitution, TagSubstitutionsController, Task, TaxaController, TestInformatics, Transfer, TransferRequest, TransferRequestCollection, TransferRequestCollectionTransferRequest, TransferTemplate, Tube, TubeCreation, TubeFromPlateCreation, TubeFromTubeCreation, TubeRack, TubeRackStatus, TubeRackStatusesController, TubeRackSummariesController, UatActionGenerator, UatActions, UatActionsController, UltimaApplication, UltimaConversionRequest, UltimaGlobal, UltimaPreset, UltimaPrimer, UltimaSequencingPipeline, UltimaSequencingRequest, UltimaTag, UltimaTagGroup, UltimaUG200SequencingPipeline, UltimaUG200SequencingRequest, UltimaUG200Validator, UltimaValidator, User, UsersController, Utf8mb3Validator, Uuid, UuidsController, ValidateSampleSheetTask, VolumeUpdate, Well, WellAttribute, WorkCompletion, WorkCompletionsSubmission, WorkOrder, WorkOrderType, Workflow, WorkflowsController, WorkingDilutionPlate, XmlLoginProxy

Constant Summary collapse

OrderTemplate =

SubmissionTemplate is really OrderTemplate, and the only place that actually cares is the API, so alias If we remove this, then we break our API endpoints. Some of which, at least at one point, actually had external users.

SubmissionTemplate

Instance Method Summary collapse

Instance Method Details

#error_message_header(object) ⇒ Object



390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
# File 'app/helpers/application_helper.rb', line 390

 do
  # NOTE: The following attribute is not required for Microarray Genotyping.
  # I think this might be broken and suggests that there should be separate classes for project: one for
  # next-gen sequencing that includes this attribute in it's metadata, and one for microarray genotyping
  # that doesn't.
  include ProjectManager::Associations
  include BudgetDivision::Associations

  custom_attribute(:project_cost_code, required: true)
  custom_attribute(:funding_comments)
  custom_attribute(:collaborators)
  custom_attribute(:external_funding_source)
  custom_attribute(:sequencing_budget_cost_centre)
  custom_attribute(:project_funding_model, in: PROJECT_FUNDING_MODELS)
  custom_attribute(:gt_committee_tracking_id)

  before_validation do |record|
    record.project_cost_code = nil if record.project_cost_code.blank?
    record.project_funding_model = nil if record.project_funding_model.blank?
  end
end

#error_messages_ul_html_safe(object) ⇒ Object



398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'app/helpers/application_helper.rb', line 398

 do
  # NOTE: The following attribute is not required for Microarray Genotyping.
  # I think this might be broken and suggests that there should be separate classes for project: one for
  # next-gen sequencing that includes this attribute in it's metadata, and one for microarray genotyping
  # that doesn't.
  include ProjectManager::Associations
  include BudgetDivision::Associations

  custom_attribute(:project_cost_code, required: true)
  custom_attribute(:funding_comments)
  custom_attribute(:collaborators)
  custom_attribute(:external_funding_source)
  custom_attribute(:sequencing_budget_cost_centre)
  custom_attribute(:project_funding_model, in: PROJECT_FUNDING_MODELS)
  custom_attribute(:gt_committee_tracking_id)

  before_validation do |record|
    record.project_cost_code = nil if record.project_cost_code.blank?
    record.project_funding_model = nil if record.project_funding_model.blank?
  end
end

#extract_barcode(args, attributes) ⇒ Object

mutates 'attributes'



111
112
113
114
115
# File 'app/models/tube.rb', line 111

def extract_barcode(args, attributes)
  barcode = args.first || attributes.delete(:barcode)
  prefix = attributes.delete(:barcode_prefix)&.prefix || default_prefix
  [barcode, prefix]
end

If consent is being withdrawn and wasn't previously, set a couple of fields



307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
# File 'app/controllers/samples_controller.rb', line 307

 do
  # NOTE: The following attribute is not required for Microarray Genotyping.
  # I think this might be broken and suggests that there should be separate classes for project: one for
  # next-gen sequencing that includes this attribute in it's metadata, and one for microarray genotyping
  # that doesn't.
  include ProjectManager::Associations
  include BudgetDivision::Associations

  custom_attribute(:project_cost_code, required: true)
  custom_attribute(:funding_comments)
  custom_attribute(:collaborators)
  custom_attribute(:external_funding_source)
  custom_attribute(:sequencing_budget_cost_centre)
  custom_attribute(:project_funding_model, in: PROJECT_FUNDING_MODELS)
  custom_attribute(:gt_committee_tracking_id)

  before_validation do |record|
    record.project_cost_code = nil if record.project_cost_code.blank?
    record.project_funding_model = nil if record.project_funding_model.blank?
  end
end

#handle_page_update_failure(sample) ⇒ Object



320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
# File 'app/controllers/samples_controller.rb', line 320

 do
  # NOTE: The following attribute is not required for Microarray Genotyping.
  # I think this might be broken and suggests that there should be separate classes for project: one for
  # next-gen sequencing that includes this attribute in it's metadata, and one for microarray genotyping
  # that doesn't.
  include ProjectManager::Associations
  include BudgetDivision::Associations

  custom_attribute(:project_cost_code, required: true)
  custom_attribute(:funding_comments)
  custom_attribute(:collaborators)
  custom_attribute(:external_funding_source)
  custom_attribute(:sequencing_budget_cost_centre)
  custom_attribute(:project_funding_model, in: PROJECT_FUNDING_MODELS)
  custom_attribute(:gt_committee_tracking_id)

  before_validation do |record|
    record.project_cost_code = nil if record.project_cost_code.blank?
    record.project_funding_model = nil if record.project_funding_model.blank?
  end
end

#handle_page_update_success(sample) ⇒ Object



314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
# File 'app/controllers/samples_controller.rb', line 314

 do
  # NOTE: The following attribute is not required for Microarray Genotyping.
  # I think this might be broken and suggests that there should be separate classes for project: one for
  # next-gen sequencing that includes this attribute in it's metadata, and one for microarray genotyping
  # that doesn't.
  include ProjectManager::Associations
  include BudgetDivision::Associations

  custom_attribute(:project_cost_code, required: true)
  custom_attribute(:funding_comments)
  custom_attribute(:collaborators)
  custom_attribute(:external_funding_source)
  custom_attribute(:sequencing_budget_cost_centre)
  custom_attribute(:project_funding_model, in: PROJECT_FUNDING_MODELS)
  custom_attribute(:gt_committee_tracking_id)

  before_validation do |record|
    record.project_cost_code = nil if record.project_cost_code.blank?
    record.project_funding_model = nil if record.project_funding_model.blank?
  end
end

#render_error_messages(object) ⇒ Object

error_messages_for method was deprecated, however lots of the tests depend on the message format it was using. https://apidock.com/rails/ActionView/Helpers/ActiveRecordHelper/error_messages_for



381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
# File 'app/helpers/application_helper.rb', line 381

 do
  # NOTE: The following attribute is not required for Microarray Genotyping.
  # I think this might be broken and suggests that there should be separate classes for project: one for
  # next-gen sequencing that includes this attribute in it's metadata, and one for microarray genotyping
  # that doesn't.
  include ProjectManager::Associations
  include BudgetDivision::Associations

  custom_attribute(:project_cost_code, required: true)
  custom_attribute(:funding_comments)
  custom_attribute(:collaborators)
  custom_attribute(:external_funding_source)
  custom_attribute(:sequencing_budget_cost_centre)
  custom_attribute(:project_funding_model, in: PROJECT_FUNDING_MODELS)
  custom_attribute(:gt_committee_tracking_id)

  before_validation do |record|
    record.project_cost_code = nil if record.project_cost_code.blank?
    record.project_funding_model = nil if record.project_funding_model.blank?
  end
end