-
Notifications
You must be signed in to change notification settings - Fork 33
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
Dpl 917 scrna faculty input submission #4067
Dpl 917 scrna faculty input submission #4067
Conversation
… scRNA core pipeline
…s to allow multiple samples per well
studies: [study], | ||
sample_metadata_attributes: { | ||
supplier_name: sample_name, | ||
cohort: "Cohort#{plate.human_barcode}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UatActions::GeneratePlates#build_sample calls 'plate.human_barcode' 2 times
# Ensures number of samples per occupied well is at least 1 | ||
def num_samples_per_well | ||
@num_samples_per_well ||= | ||
if number_of_samples_in_each_well.present? && number_of_samples_in_each_well.to_i.positive? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UatActions::GeneratePlates#num_samples_per_well calls 'number_of_samples_in_each_well.to_i' 2 times
sample.save!(validate: false) | ||
|
||
if num_samples_per_well > 1 | ||
well.aliquots.create!(sample: sample, study: study, tag_depth: sample_index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UatActions::GeneratePlates#save_sample calls 'well.aliquots' 2 times
studies: [study], | ||
sample_metadata_attributes: { | ||
supplier_name: sample_name, | ||
cohort: "Cohort#{plate.human_barcode}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UatActions::GeneratePlates#build_sample refers to 'plate' more than self (maybe move it to another class?)
} | ||
) | ||
sample.save!(validate: false) | ||
num_samples_per_well.times { |sample_index| create_sample(plate, well, sample_index + 1) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UatActions::GeneratePlates#construct_wells contains iterators nested 2 deep
sample_name = "sample_#{sample_index}_#{plate.human_barcode}_#{well.map.description}" | ||
sample = build_sample(sample_name, plate) | ||
save_sample(sample, well, sample_index) | ||
rescue ActiveRecord::RecordInvalid => e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UatActions::GeneratePlates#create_sample has the variable name 'e'
# Ensures number of samples per occupied well is at least 1 | ||
def num_samples_per_well | ||
@num_samples_per_well ||= | ||
if number_of_samples_in_each_well.present? && number_of_samples_in_each_well.to_i.positive? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UatActions::TestSubmission#num_samples_per_well calls 'number_of_samples_in_each_well.to_i' 2 times
# The well layout is set to 'Random'. | ||
# The number of samples in each well is set to num_samples_per_well. | ||
# @return [UatActions::GeneratePlates] the configured plate generator | ||
def setup_generator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UatActions::TestSubmission#setup_generator has approx 6 statements
… to only create one request per well
Code Climate has analyzed commit 8ce8f7e and detected 11 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 97.8% (50% is the threshold). This pull request will bring the total coverage in the repository to 86.7% (0.0% change). View more on Code Climate. |
Closes #3901
Changes proposed in this pull request
Adds submission template for faculty input plate