Skip to content

Genotyping data derived from genotyping plate (display, download, delete) #5413

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

Open
wants to merge 52 commits into
base: master
Choose a base branch
from

Conversation

titima15
Copy link
Contributor

@titima15 titima15 commented Apr 7, 2025


Checklist

  • Refactoring only
  • Documentation only
  • Fixture update only
  • Bug fix
    • The relevant issue has been closed.
    • Further work is required.
  • New feature
    • Relevant tests have been created and run.
    • Data was added to the fixture
      • Data was added via a patch in /t/data/fixture/patches/.
    • User-Facing Change
      • The user manual in /docs has been updated.
    • Any new Perl has been documented using perldoc.
    • Any new JavaScript has been documented using JSDoc.
    • Any new legacy JavaScript has been moved from /js to /js/source/legacy.

@titima15 titima15 requested review from lukasmueller and isaak April 7, 2025 13:00
@titima15
Copy link
Contributor Author

titima15 commented Apr 7, 2025

  • For download function, add an option to select unit level (sample name, accession or sample name|accession as header identifiers.
  • Add an option to keep genotyping protocol after deleting all associated genotyping data.

$where_clause = "nd_experiment_protocol.nd_protocol_id = $genotyping_protocol_id";
}

my $q = "SELECT nd_experiment_genotype.nd_experiment_id, nd_experiment_genotype.genotype_id, nd_experiment_protocol.nd_protocol_id
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if you call the delete_genotype_data function without any of ids...may be check at least one of them is passed to the delete object before making the query to avoid runtime error...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


if ($genotyping_plate_id) {
my @plate_list = ();
@plate_list = ($genotyping_plate_id);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

combine line 72 and 73?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

} elsif ($genotyping_project_id) {
$where_clause = "nd_experiment_project.project_id = $genotyping_project_id";
} elsif ($genotyping_protocol_id) {
$where_clause = "nd_experiment_protocol.nd_protocol_id = $genotyping_protocol_id";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should try to use only placeholders in sql statements. Could you replace the embedded variables with placeholders (?) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lukasmueller I have been using placeholders in all cases, except this type of statements "join ("," , @$sample_list)", because it doesn't work with the placeholder.

@titima15
Copy link
Contributor Author

@isaak Thanks Isaak. I fixed both requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants