biocore / labadmin

Administration website for the Knight Lab
4 stars 16 forks source link

Prepare shotgun libraries #215

Closed antgonza closed 7 years ago

wasade commented 7 years ago

Ya, but that's not an issue for numpy. The IDs from biom are np array and it's nice for indexing. Doesn't really matter here? But may be nice for consistency of indexing/slicing, although I don't think we're actually doing that so it may just be extraneous. The reason I pushed for arrya on the other values is that it's the natural way to represent, avoids jagged arrays, get slicing, shape, etc

On Apr 14, 2017 15:58, "Antonio Gonzalez" notifications@github.com wrote:

@antgonza commented on this pull request.

In knimin/lib/data_access.py https://github.com/biocore/labadmin/pull/215#discussion_r111647717:

  • if water_volumes is None:
  • water_volumes = np.zeros((n_rows, n_cols))
  • water_volumes[row, col] = water_volume_nl
  • if qpcr_concentration is not None:
  • if qpcr_concentrations is None:
  • qpcr_concentrations = np.zeros((n_rows, n_cols))
  • qpcr_concentrations[row, col] = qpcr_concentration
  • if qpcr_cp is not None:
  • if qpcr_cps is None:
  • qpcr_cps = np.zeros((n_rows, n_cols))
  • qpcr_cps[row, col] = qpcr_cp
  • if si5i is not None:
  • if shotgun_i5_index is None:
  • shotgun_i5_index = [[None for c in range(n_cols)]
  • for r in range(n_rows)]
  • shotgun_i5_index[row][col] = si5i

Thought about it but in this case these are strings (the primary keys are varchars) so they are list of list of string.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/biocore/labadmin/pull/215#discussion_r111647717, or mute the thread https://github.com/notifications/unsubscribe-auth/AAc8snEgre1Ow05uUbbjzmYOprWovGnFks5rv_omgaJpZM4M-Jtk .

wasade commented 7 years ago

Meh, let's defer

On Apr 14, 2017 16:12, "Antonio Gonzalez" notifications@github.com wrote:

@antgonza commented on this pull request.

In knimin/lib/data_access.py https://github.com/biocore/labadmin/pull/215#discussion_r111648673:

  • if water_volumes is None:
  • water_volumes = np.zeros((n_rows, n_cols))
  • water_volumes[row, col] = water_volume_nl
  • if qpcr_concentration is not None:
  • if qpcr_concentrations is None:
  • qpcr_concentrations = np.zeros((n_rows, n_cols))
  • qpcr_concentrations[row, col] = qpcr_concentration
  • if qpcr_cp is not None:
  • if qpcr_cps is None:
  • qpcr_cps = np.zeros((n_rows, n_cols))
  • qpcr_cps[row, col] = qpcr_cp
  • if si5i is not None:
  • if shotgun_i5_index is None:
  • shotgun_i5_index = [[None for c in range(n_cols)]
  • for r in range(n_rows)]
  • shotgun_i5_index[row][col] = si5i

I can change if you feel strongly about it. My problem is how to create an empty list of strings, not sure if I should create it as '', 0s or nans?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/biocore/labadmin/pull/215#discussion_r111648673, or mute the thread https://github.com/notifications/unsubscribe-auth/AAc8siowrSICQhqcVoBaR0qE405BqnW5ks5rv_1wgaJpZM4M-Jtk .