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

Multiple target loci in a sequencing run #132

Closed
bussec opened this issue May 2, 2018 · 4 comments · Fixed by #156
Closed

Multiple target loci in a sequencing run #132

bussec opened this issue May 2, 2018 · 4 comments · Fixed by #156
Labels

Comments

@bussec
Copy link
Member

bussec commented May 2, 2018

A number of experimental setups (e.g. linkage PCR, single-cell PCR) have more than one target locus.
However, the keywords pcr_target_locus, forward_pcr_primer_target_location, reverse_pcr_primer_target_location, which are currently expected to hold only a single locus or index. Can we refine these field as holding arrays of strings/integers?

@bussec bussec added the MiAIRR label May 2, 2018
@schristley
Copy link
Member

Yes, OpenAPI allows for array to be specified for the type with items indicating the data type of the items within the array. Something like this:

forward_pcr_primer_target_location:
   type: array
   items:
      type: integer

reverse_pcr_primer_target_location:
   type: array
   items:
      type: integer

JSON example value looks like:

{
   forward_pcr_primer_target_location: [5, 20, 100],
   reverse_pcr_primer_target_location: [150, 200, 210]
}

Now you can also have an array of objects. For example, if values in the arrays are supposed to be paired together, then it makes more sense to have an array of objects where you can unambiguously define the paired values, instead of relying on the array index, which might get out of sync.

primer_target_location:
   type: array
   items:
      type: object
      properties:
         forward_pcr_primer_target_location:
            type: integer
         reverse_pcr_primer_target_location:
            type: integer

JSON example value looks like:

{
   primer_target_location: [
      {
         forward_pcr_primer_target_location: 5,
         reverse_pcr_primer_target_location: 150,
      },
      {
         forward_pcr_primer_target_location: 20,
         reverse_pcr_primer_target_location: 200,
      },
      {
         forward_pcr_primer_target_location: 100,
         reverse_pcr_primer_target_location: 210,
      },
   ]
}

@schristley
Copy link
Member

@bussec, as the schema is currently being updated, should I change these fields to arrays? Do the examples I give cover your use case?

@bussec
Copy link
Member Author

bussec commented Aug 8, 2018

Yes, they cover the use case. Was there any reason not to include pcr_target_locus (type: string) into the object?

@schristley
Copy link
Member

schristley commented Aug 8, 2018

No, that's me being clueless. Now I'm a little less but to be more specific, I offered two possibilities. One is they are separate lists with no association between the values:

{
   pcr_target_locus: ['foo', 'bar'],
   forward_pcr_primer_target_location: [5, 20, 100],
   reverse_pcr_primer_target_location: [150, 210]
}

While the other is that they have some sort of association and thus combined into an object. I think pcr_target_locus should have a location with it, but is it both a forward and reverse or just one of them? Another structure is that a single pcr_target_locus has multiple locations. What would you consider to be the most general case?

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

Successfully merging a pull request may close this issue.

2 participants