Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: sample lims and sample UUID #481

Merged
4 changes: 3 additions & 1 deletion lib/WTSI/NPG/HTS/Illumina/Annotator.pm
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,12 @@ sub make_sample_metadata {
my $method_attr =
{sample_accession_numbers => $SAMPLE_ACCESSION_NUMBER,
sample_ids => $SAMPLE_ID,
sample_lims => $SAMPLE_LIMS,
sample_names => $SAMPLE_NAME,
sample_public_names => $SAMPLE_PUBLIC_NAME,
sample_common_names => $SAMPLE_COMMON_NAME,
sample_supplier_names => $SAMPLE_SUPPLIER_NAME,
sample_uuids => $SAMPLE_UUID,
sample_cohorts => $SAMPLE_COHORT,
sample_donor_ids => $SAMPLE_DONOR_ID};

Expand Down Expand Up @@ -585,7 +587,7 @@ Keith James <[email protected]>, Iain Bancarz <[email protected]>

=head1 COPYRIGHT AND DISCLAIMER

Copyright (C) 2015, 2016, 2017, 2018, 2019 Genome Research Limited.
Copyright (C) 2015, 2016, 2017, 2018, 2019, 2024 Genome Research Limited.
All Rights Reserved.

This program is free software: you can redistribute it and/or modify
Expand Down
4 changes: 3 additions & 1 deletion lib/WTSI/NPG/HTS/PacBio/Annotator.pm
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ sub make_sample_metadata {
my @samples = map { $_->sample } @run_records;
my $method_attr = {accession_number => $SAMPLE_ACCESSION_NUMBER,
id_sample_lims => $SAMPLE_ID,
id_lims => $SAMPLE_LIMS,
uuid_sample_lims => $SAMPLE_UUID,
name => $SAMPLE_NAME,
public_name => $SAMPLE_PUBLIC_NAME,
common_name => $SAMPLE_COMMON_NAME,
Expand Down Expand Up @@ -319,7 +321,7 @@ Keith James <[email protected]>

=head1 COPYRIGHT AND DISCLAIMER

Copyright (C) 2016, 2017 Genome Research Limited. All Rights Reserved.
Copyright (C) 2016, 2017, 2024 Genome Research Limited. All Rights Reserved.

This program is free software: you can redistribute it and/or modify
it under the terms of the Perl Artistic License or the GNU General
Expand Down
2 changes: 2 additions & 0 deletions t/lib/WTSI/NPG/HTS/Illumina/AgfDataObjectTest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,10 @@ sub update_secondary_metadata_tag1_no_spike_human : Test(12) {
{attribute => $SAMPLE_COMMON_NAME, value => 'Mus musculus'},
{attribute => $SAMPLE_DONOR_ID, value => '2905STDY6178180'},
{attribute => $SAMPLE_ID, value => '2376982'},
{attribute => $SAMPLE_LIMS, value => 'SQSCP'},
{attribute => $SAMPLE_PUBLIC_NAME, value => 'UTX_IP_UTX_GTX_A'},
{attribute => $SAMPLE_SUPPLIER_NAME, value => 'UTX_IP_UTX_GTX_A'},
{attribute => $SAMPLE_UUID, value => '4e0f6640-40f7-11e5-998e-3c4a9275d6c6'},
{attribute => $STUDY_NAME,
value => 'Analysis of the chromatin state of mouse stem and progenitor cell compartment'},
{attribute => $STUDY_ACCESSION_NUMBER, value => 'ERP004563'},
Expand Down
90 changes: 90 additions & 0 deletions t/lib/WTSI/NPG/HTS/Illumina/AlnDataObjectTest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,9 @@ sub nonconsented_human_access_revoked : Test(6) {
{attribute => $SAMPLE_COMMON_NAME,
value => 'Burkholderia pseudomallei'},
{attribute => $SAMPLE_ID, value => '230889'},
{attribute => $SAMPLE_LIMS, value => 'SQSCP'},
{attribute => $SAMPLE_PUBLIC_NAME, value => '153.0'},
{attribute => $SAMPLE_UUID, value => 'a8b4ebaa-c628-11df-8e7f-00144f2062b0'},
{attribute => $STUDY_NAME,
value => 'Burkholderia pseudomallei diversity'},
{attribute => $STUDY_ACCESSION_NUMBER, value => 'ERP000251'},
Expand Down Expand Up @@ -679,6 +681,7 @@ sub update_secondary_metadata_tag0_no_spike_bact : Test(12) {
{attribute => $SAMPLE_ID, value => '230919'},
{attribute => $SAMPLE_ID, value => '230920'},
{attribute => $SAMPLE_ID, value => '230921'},
{attribute => $SAMPLE_LIMS, value => 'SQSCP'},
{attribute => $SAMPLE_PUBLIC_NAME, value => '10/96'},
{attribute => $SAMPLE_PUBLIC_NAME, value => '109/96'},
{attribute => $SAMPLE_PUBLIC_NAME, value => '15/96'},
Expand Down Expand Up @@ -712,6 +715,39 @@ sub update_secondary_metadata_tag0_no_spike_bact : Test(12) {
{attribute => $SAMPLE_PUBLIC_NAME, value => 'K11277244-293'},
{attribute => $SAMPLE_PUBLIC_NAME, value => 'P73230-3018'},
{attribute => $SAMPLE_PUBLIC_NAME, value => 'SOIL'},
{attribute => $SAMPLE_UUID, value => 'a8b4ebaa-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b4f3ac-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b4fbae-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b503a6-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b50b9e-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b51396-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b51ba2-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5239a-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b52b92-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5338a-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b53b82-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5437a-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b54b7c-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b55374-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b55b94-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5638c-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b56bb6-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b573ae-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b57bb0-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b583a8-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b58b96-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5938e-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b59b86-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5a37e-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5ab6c-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5b364-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5bb5c-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5c35e-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5cb4c-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5d34e-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5db46-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5e352-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5eb54-c628-11df-8e7f-00144f2062b0'},
{attribute => $STUDY_NAME,
value => 'Burkholderia pseudomallei diversity'},
{attribute => $STUDY_ACCESSION_NUMBER, value => 'ERP000251'},
Expand Down Expand Up @@ -904,6 +940,7 @@ sub update_secondary_metadata_tag0_spike_bact : Test(12) {
{attribute => $SAMPLE_ID, value => '230919'},
{attribute => $SAMPLE_ID, value => '230920'},
{attribute => $SAMPLE_ID, value => '230921'},
{attribute => $SAMPLE_LIMS, value => 'SQSCP'},
{attribute => $SAMPLE_PUBLIC_NAME, value => '10/96'},
{attribute => $SAMPLE_PUBLIC_NAME, value => '109/96'},
{attribute => $SAMPLE_PUBLIC_NAME, value => '15/96'},
Expand Down Expand Up @@ -937,6 +974,40 @@ sub update_secondary_metadata_tag0_spike_bact : Test(12) {
{attribute => $SAMPLE_PUBLIC_NAME, value => 'K11277244-293'},
{attribute => $SAMPLE_PUBLIC_NAME, value => 'P73230-3018'},
{attribute => $SAMPLE_PUBLIC_NAME, value => 'SOIL'},
{attribute => $SAMPLE_UUID, value => 'a8b4ebaa-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b4f3ac-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b4fbae-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b503a6-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b50b9e-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b51396-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b51ba2-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5239a-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b52b92-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5338a-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b53b82-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5437a-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b54b7c-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b55374-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b55b94-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5638c-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b56bb6-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b573ae-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b57bb0-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b583a8-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b58b96-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5938e-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b59b86-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5a37e-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5ab6c-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5b364-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5bb5c-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5c35e-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5cb4c-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5d34e-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5db46-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5e352-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'a8b5eb54-c628-11df-8e7f-00144f2062b0'},
{attribute => $SAMPLE_UUID, value => 'd3a59c4c-c037-11e0-834c-00144f01a414'},
{attribute => $STUDY_NAME,
value => 'Burkholderia pseudomallei diversity'},
{attribute => $STUDY_NAME,
Expand Down Expand Up @@ -998,7 +1069,9 @@ sub update_secondary_metadata_tag1_no_spike_bact : Test(12) {
{attribute => $SAMPLE_COMMON_NAME,
value => 'Burkholderia pseudomallei'},
{attribute => $SAMPLE_ID, value => '230889'},
{attribute => $SAMPLE_LIMS, value => 'SQSCP'},
{attribute => $SAMPLE_PUBLIC_NAME, value => '153.0'},
{attribute => $SAMPLE_UUID, value => 'a8b4ebaa-c628-11df-8e7f-00144f2062b0'},
{attribute => $STUDY_NAME,
value => 'Burkholderia pseudomallei diversity'},
{attribute => $STUDY_ACCESSION_NUMBER, value => 'ERP000251'},
Expand Down Expand Up @@ -1056,7 +1129,9 @@ sub update_secondary_metadata_tag1_spike_bact : Test(12) {
{attribute => $SAMPLE_COMMON_NAME,
value => 'Burkholderia pseudomallei'},
{attribute => $SAMPLE_ID, value => '230889'},
{attribute => $SAMPLE_LIMS, value => 'SQSCP'},
{attribute => $SAMPLE_PUBLIC_NAME, value => '153.0'},
{attribute => $SAMPLE_UUID, value => 'a8b4ebaa-c628-11df-8e7f-00144f2062b0'},
{attribute => $STUDY_NAME,
value => 'Burkholderia pseudomallei diversity'},
{attribute => $STUDY_ACCESSION_NUMBER, value => 'ERP000251'},
Expand Down Expand Up @@ -1129,10 +1204,15 @@ sub update_secondary_metadata_tag0_no_spike_human : Test(12) {
{attribute => $SAMPLE_ID, value => '1877289'},
{attribute => $SAMPLE_ID, value => '1877292'},
{attribute => $SAMPLE_ID, value => '1877306'},
{attribute => $SAMPLE_LIMS, value => 'SQSCP'},
{attribute => $SAMPLE_SUPPLIER_NAME, value => '6AJ182'},
{attribute => $SAMPLE_SUPPLIER_NAME, value => '7R5'},
{attribute => $SAMPLE_SUPPLIER_NAME, value => '8AJ1'},
{attribute => $SAMPLE_SUPPLIER_NAME, value => '8R163'},
{attribute => $SAMPLE_UUID, value => 'd41d4a40-a521-11e3-8055-3c4a9275d6c6'},
{attribute => $SAMPLE_UUID, value => 'd492a150-a521-11e3-8055-3c4a9275d6c6'},
{attribute => $SAMPLE_UUID, value => 'd4ee2ed0-a521-11e3-8055-3c4a9275d6c6'},
{attribute => $SAMPLE_UUID, value => 'd62d8ca0-a521-11e3-8055-3c4a9275d6c6'},
{attribute => $STUDY_NAME,
value => 'SEQCAP_Lebanon_LowCov-seq'},
{attribute => $STUDY_ACCESSION_NUMBER, value => 'EGAS00001002084'},
Expand Down Expand Up @@ -1209,10 +1289,16 @@ sub update_secondary_metadata_tag0_spike_human : Test(12) {
{attribute => $SAMPLE_ID, value => '1877289'},
{attribute => $SAMPLE_ID, value => '1877292'},
{attribute => $SAMPLE_ID, value => '1877306'},
{attribute => $SAMPLE_LIMS, value => 'SQSCP'},
{attribute => $SAMPLE_SUPPLIER_NAME, value => '6AJ182'},
{attribute => $SAMPLE_SUPPLIER_NAME, value => '7R5'},
{attribute => $SAMPLE_SUPPLIER_NAME, value => '8AJ1'},
{attribute => $SAMPLE_SUPPLIER_NAME, value => '8R163'},
{attribute => $SAMPLE_UUID, value => 'd3a59c4c-c037-11e0-834c-00144f01a414'},
{attribute => $SAMPLE_UUID, value => 'd41d4a40-a521-11e3-8055-3c4a9275d6c6'},
{attribute => $SAMPLE_UUID, value => 'd492a150-a521-11e3-8055-3c4a9275d6c6'},
{attribute => $SAMPLE_UUID, value => 'd4ee2ed0-a521-11e3-8055-3c4a9275d6c6'},
{attribute => $SAMPLE_UUID, value => 'd62d8ca0-a521-11e3-8055-3c4a9275d6c6'},
{attribute => $STUDY_NAME, value => 'Illumina Controls'},
{attribute => $STUDY_NAME,
value => 'SEQCAP_Lebanon_LowCov-seq'},
Expand Down Expand Up @@ -1273,7 +1359,9 @@ sub update_secondary_metadata_tag81_no_spike_human : Test(12) {
{attribute => $SAMPLE_COMMON_NAME, value => 'Homo Sapien'},
{attribute => $SAMPLE_DONOR_ID, value => 'T19PG5759041'},
{attribute => $SAMPLE_ID, value => '1877285'},
{attribute => $SAMPLE_LIMS, value => 'SQSCP'},
{attribute => $SAMPLE_SUPPLIER_NAME, value => '7R5'},
{attribute => $SAMPLE_UUID, value => 'd41d4a40-a521-11e3-8055-3c4a9275d6c6'},
{attribute => $STUDY_NAME,
value => 'SEQCAP_Lebanon_LowCov-seq'},
{attribute => $STUDY_ACCESSION_NUMBER, value => 'EGAS00001002084'},
Expand Down Expand Up @@ -1331,7 +1419,9 @@ sub update_secondary_metadata_tag81_spike_human : Test(12) {
{attribute => $SAMPLE_COMMON_NAME, value => 'Homo Sapien'},
{attribute => $SAMPLE_DONOR_ID, value => 'T19PG5759041'},
{attribute => $SAMPLE_ID, value => '1877285'},
{attribute => $SAMPLE_LIMS, value => 'SQSCP'},
{attribute => $SAMPLE_SUPPLIER_NAME, value => '7R5'},
{attribute => $SAMPLE_UUID, value => 'd41d4a40-a521-11e3-8055-3c4a9275d6c6'},
{attribute => $STUDY_NAME,
value => 'SEQCAP_Lebanon_LowCov-seq'},
{attribute => $STUDY_ACCESSION_NUMBER, value => 'EGAS00001002084'},
Expand Down
2 changes: 2 additions & 0 deletions t/lib/WTSI/NPG/HTS/Illumina/MetaUpdaterTest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ sub update_secondary_metadata : Test(5) {
{ attribute => $SAMPLE_COMMON_NAME,
value => 'Burkholderia pseudomallei' },
{ attribute => $SAMPLE_ID, value => '230889' },
{ attribute => $SAMPLE_LIMS, value => 'SQSCP' },
{ attribute => $SAMPLE_PUBLIC_NAME, value => '153.0' },
{ attribute => $SAMPLE_UUID, value => 'a8b4ebaa-c628-11df-8e7f-00144f2062b0' },
{ attribute => $STUDY_NAME,
value => 'Burkholderia pseudomallei diversity' },
{ attribute => $STUDY_ACCESSION_NUMBER, value => 'ERP000251' },
Expand Down
2 changes: 2 additions & 0 deletions t/lib/WTSI/NPG/HTS/PacBio/MetaUpdaterTest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ sub update_secondary_metadata : Test(8) {
{attribute => $SAMPLE_COMMON_NAME, value => 'Anopheles gambiae'},
{attribute => $SAMPLE_DONOR_ID, value => '2572STDY6358500'},
{attribute => $SAMPLE_ID, value => 2567488},
{attribute => $SAMPLE_LIMS, value => 'SQSCP'},
{attribute => $SAMPLE_PUBLIC_NAME, value => 70628},
{attribute => $SAMPLE_SUPPLIER_NAME, value => 'AR0091-CW'},
{attribute => $SAMPLE_UUID, value => '1ca1a900-e463-11e5-88b1-3c4a9275d6c6'},
{attribute => $STUDY_NAME, value => $study_name},
{attribute => $STUDY_ACCESSION_NUMBER, value => 'ERP002372'},
{attribute => $STUDY_ID, value => $study_id},
Expand Down
Loading