Skip to content

Commit

Permalink
Merge pull request #122 from sanger/GPL-632-as-a-long-read-user-i-wou…
Browse files Browse the repository at this point in the history
…ld-like-to-add-the-tag2-column-to-the-pacbio-table

Added tag2 information to pac_bio_run table.
  • Loading branch information
stevieing authored Sep 10, 2020
2 parents 9e51581 + b34425d commit 29e90aa
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
13 changes: 13 additions & 0 deletions db/migrate/20200909085557_add_tag2_to_pac_bio_run.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

# Add tag2 information to the pac_bio_run table so we can do dual indexing
class AddTag2ToPacBioRun < ActiveRecord::Migration
def change
change_table :pac_bio_run, bulk: true do |t|
t.string 'tag2_sequence', limit: 30, comment: 'Tag sequence for tag 2', after: :tag_set_name
t.string 'tag2_set_id_lims', limit: 20, comment: 'LIMs-specific identifier of the tag set for tag 2', after: :tag2_sequence
t.string 'tag2_set_name', limit: 100, comment: 'WTSI-wide tag set name for tag 2', after: :tag2_set_id_lims
t.string 'tag2_identifier', limit: 30, comment: 'The position of tag2 within the tag group', after: :tag2_set_name
end
end
end
10 changes: 8 additions & 2 deletions db/structure.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- MySQL dump 10.13 Distrib 8.0.19, for osx10.15 (x86_64)
-- MySQL dump 10.13 Distrib 8.0.19, for osx10.14 (x86_64)
--
-- Host: localhost Database: unified_warehouse_development
-- ------------------------------------------------------
Expand Down Expand Up @@ -205,6 +205,10 @@ CREATE TABLE `pac_bio_run` (
`tag_sequence` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Tag sequence for tag',
`tag_set_id_lims` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'LIMs-specific identifier of the tag set for tag',
`tag_set_name` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'WTSI-wide tag set name for tag',
`tag2_sequence` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Tag sequence for tag 2',
`tag2_set_id_lims` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'LIMs-specific identifier of the tag set for tag 2',
`tag2_set_name` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'WTSI-wide tag set name for tag 2',
`tag2_identifier` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The position of tag2 within the tag group',
`plate_barcode` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'The human readable barcode for the plate loaded onto the machine',
`plate_uuid_lims` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'The plate uuid',
`well_label` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'The well identifier for the plate, A1-H12',
Expand Down Expand Up @@ -441,7 +445,7 @@ CREATE TABLE `study_users` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2020-05-18 11:09:26
-- Dump completed on 2020-09-10 10:12:23
INSERT INTO schema_migrations (version) VALUES ('20141113110635');

INSERT INTO schema_migrations (version) VALUES ('20141113130813');
Expand Down Expand Up @@ -538,3 +542,5 @@ INSERT INTO schema_migrations (version) VALUES ('20200512152113');

INSERT INTO schema_migrations (version) VALUES ('20200518083730');

INSERT INTO schema_migrations (version) VALUES ('20200909085557');

8 changes: 8 additions & 0 deletions spec/models/pac_bio_run_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
"cost_code" => "cost_code1",
"tag_set_name" => "Sanger_168tags - 10 mer tags",
"study_uuid" => '000000-0000-0000-0000-0000000001',
'tag2_identifier' => '1',
'tag2_sequence' => 'GTCA',
'tag2_set_id_lims' => '2',
'tag2_set_name' => 'tag_set_2'
},
{
"sample_uuid" => '000000-0000-0000-0000-0000000000',
Expand All @@ -58,6 +62,10 @@
"cost_code" => "cost_code1",
"tag_set_name" => "Sanger_168tags - 10 mer tags",
"study_uuid" => '000000-0000-0000-0000-0000000001',
'tag2_identifier' => '1',
'tag2_sequence' => 'GTCA',
'tag2_set_id_lims' => '2',
'tag2_set_name' => 'tag_set_2'
}
]
},
Expand Down

0 comments on commit 29e90aa

Please sign in to comment.