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

Sgn 5022 show stored analysis #43

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

Conversation

ryan-preble
Copy link

Adds a function to Stock.pm to allow for the retrieval of stored analyses using a stock (accession only currently). The existing function for retrieving field trials from stock was changed to exclude breeding programs and stored analyses.

lib/CXGN/Chado/Stock.pm Show resolved Hide resolved
AND cvterm.name!='phenotyping_experiment'
AND cvterm.name!='analysis_experiment'
AND breeding_program_id IS NULL;";
} else { # Odds are if this is not an accession, it is a plot.
Copy link
Member

Choose a reason for hiding this comment

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

can it also be a plant or tissue sample? is the query going to work in such cases?

Copy link
Author

Choose a reason for hiding this comment

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

I am pretty sure it would not work if those stocks were used but the original code that was there only distinguishes between accessions and non-accession stocks, and I did not want to change that. As far as I can tell though, these functions are only ever called on accessions and plots, so I do not think it matters. Would it be better to throw an error for invalid stock types?

Copy link
Member

Choose a reason for hiding this comment

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

I think it would be better to be explicit about this, and check if the stock is an accession or a plot, and throw an error if neither

lib/CXGN/Chado/Stock.pm Show resolved Hide resolved
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.

2 participants