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

Refactoring the SampleAssayPlan to a graph structure #329

Closed
Zigur opened this issue Mar 22, 2019 · 3 comments
Closed

Refactoring the SampleAssayPlan to a graph structure #329

Zigur opened this issue Mar 22, 2019 · 3 comments
Assignees
Milestone

Comments

@Zigur
Copy link
Contributor

Zigur commented Mar 22, 2019

The SampleAssayGraph is embedded in a graph

  • ProductNode
  • ProtocolNode

A ProductNode can only be chained to a ProtocolNode
A ProtocolNode can also be chained to one or more other ProductNode

This must be serialized to JSON

@Zigur Zigur self-assigned this Mar 22, 2019
Zigur added a commit that referenced this issue Mar 26, 2019
Zigur added a commit that referenced this issue Mar 27, 2019
Zigur added a commit that referenced this issue Mar 28, 2019
Zigur added a commit that referenced this issue Apr 1, 2019
Zigur added a commit that referenced this issue Apr 2, 2019
Zigur added a commit that referenced this issue Apr 4, 2019
@Zigur
Copy link
Contributor Author

Zigur commented Apr 5, 2019

To generate a SampleAndAssayPlan from a minimal configuration we need:

  • A JSON structure that defines the template nodes and the links among them (something along the lines of https://github.com/ISA-tools/ISAdatasets/blob/tests/json/create/matabolite-profiling-ms.json)
  • A dictionary that for each ProductNode specifies a list of triples (product_type, product_size, is_product_input_to_next_protocols=True). the triples could be stored either as tuples or dictionaries.
  • A dictionary for each ProtocolNode where for each `ProtocolParameter' we specify the values that are going to be used (e.g. the different types of instruments and the different acquisition or injection modes for MS)

@Zigur
Copy link
Contributor Author

Zigur commented Apr 9, 2019

More thorough specifications on the basis of the draft document, as redacted by Philippe.

I will represent the SampleAndAssay plan as an OrderedDict that we can call for now sample_and_assay_plan_dict where each key represents either a ProcessNode or a ProductNode.

For a ProductNode we are to provide the following information. This can be provided as a nested dictionary or as a tuple, to be determined soon (I guess a dict is a better option:

  • product_type: this is to be a string or a isatools.model.Characteristic specifying the type of product (e.g. 'organism_part'/'liver', or 'extract_type'/'RNA' or 'extract_type'/'polar fraction' and so on
  • product_size: the number of outputs of that PrductNode for each input ProcessNode
  • technical_replicates: if it makes sense having them
  • is_product_input_to_next_protocol: a boolean: True if yes, False if not

For a ProcessNode we will provide the following information in a dictionary:

  • params: a dictionary of parameters. They keys will be the ParameterName while the values (one or more than one) are the ParameterValues that will be used. A cartesian product of all the possible combinations of parameter values will be computed when creating the full plan and the full isatools.model.Investigation object. We will need somehow configuration files containing the possible ParameterValues for each ParameterName that is somehow standardized
    Just as an example from the document above, possible parameter keys are:
  1. 'instrument' (values: 'Illumina Genome Analyzer', 'Illumina HiSeq 4000', ...) and 'library layout' (values: 'single', 'paired') for transcription profiling,
  2. 'instrument' (values: 'Agilent QTOF §', 'Shimadzu xyz', ...), 'injection mode' (values: 'FIA', 'LC', 'GC'), 'acquisition_mode' (values: 'positive', 'negative', 'positive/negative') and 'derivatization' (values: 'oxymation', 'acetylation', etc..., optional only if GC=True) for (GC)MS profiling. Checks on parameters can only be done if a validation_template is provided (more of this later)
  • technical_replicates: an int. If not provided it defaults to 1.

More details and a full dictionary/JSON example to follow

The full graph of the Sample and assay plan will be produced from a dedicated metod that will take the sample_and_assay_plan_dict discussed above and an optional validation_template, a JSON or dict that specifies the rules for the current workflow. The signature of the method will then be:

  • generate_sample_and_assay_graph(sample_and_assay_plan_dict, validation_template=None)

Then from the SampleAndAssayGraph object we can create the full ISA study + assays

Zigur added a commit that referenced this issue Apr 9, 2019
Zigur added a commit that referenced this issue Apr 12, 2019
Zigur added a commit that referenced this issue Apr 12, 2019
Zigur added a commit that referenced this issue Apr 23, 2019
Zigur added a commit that referenced this issue Apr 25, 2019
Zigur added a commit that referenced this issue Apr 26, 2019
Zigur added a commit that referenced this issue Apr 30, 2019
Zigur added a commit that referenced this issue May 1, 2019
Zigur added a commit that referenced this issue May 20, 2019
Zigur added a commit that referenced this issue Jul 24, 2019
Zigur added a commit that referenced this issue Jul 25, 2019
Zigur added a commit that referenced this issue Jul 29, 2019
Zigur added a commit that referenced this issue Jul 31, 2019
Zigur added a commit that referenced this issue Jul 31, 2019
Zigur added a commit that referenced this issue Aug 12, 2019
Zigur added a commit that referenced this issue Aug 13, 2019
Zigur added a commit that referenced this issue Aug 23, 2019
Zigur added a commit that referenced this issue Aug 27, 2019
Zigur added a commit that referenced this issue Sep 5, 2019
Zigur added a commit that referenced this issue Sep 19, 2019
Zigur added a commit that referenced this issue Oct 1, 2019
Zigur added a commit that referenced this issue Oct 3, 2019
@Zigur
Copy link
Contributor Author

Zigur commented Oct 7, 2019

The work on the SampleAndAssayPlans has been completed. The following work on the StudyDesign will be tracked using issues

@Zigur Zigur closed this as completed Oct 7, 2019
Zigur added a commit that referenced this issue Oct 25, 2019
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

No branches or pull requests

2 participants