biocore / LabControl

lab manager for plate maps and sequence flows
BSD 3-Clause "New" or "Revised" License
2 stars 15 forks source link

Prepare Sequencing Run allows users to mix amplicon and metagenomics pools, which leads to error downstream in sequencing run sample sheet preparation #498

Closed AmandaBirmingham closed 5 years ago

AmandaBirmingham commented 5 years ago

Currently, when selecting a sequencer that has more than one lane (and thus accepts more than one pool), nothing prevents the user from mixing amplicon pool(s) with shotgun (plate) pool(s). Unfortunately, this mixing was not anticipated in the software development and causes problems at the sample sheet download step: if the shotgun pool is added first, the code assumes all pools are shotgun pools and throws an error when trying to trace back info to generate the sample sheet because the amplicon pools do not have normalized gdna records. If the amplicon pool is added first, the code produces an amplicon-style sample sheet that is (probably?) not correct/useful for a shotgun pool. See animated gif below demonstrating both use cases:

issue498

AmandaBirmingham commented 5 years ago

Note that the proximate reason for the incorrect behavior is

https://github.com/jdereus/labman/blob/1b6163584d1a4a0e5222b200dfe6cda1253bf71f/labcontrol/db/process.py#L2713-L2715

Which only checks the composition type of the FIRST pool component when deciding whether the sequencing run is amplicon or shotgun. However, the ultimate cause is that the code doesn't support having both kinds in the same pool (even if we DID detect it) so better to fix that.