Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Code Generator
#6
Well done! 

The easiest way to achieve what you want is to just repeat the source in the cDNA_sources list. However that will give you a result like this:
Output:
Transfering          6ul from A1 to ['A1', 'A2', 'A3', 'A4', 'A5', 'A6'] Transfering          6ul from A2 to ['B1', 'B2', 'B3', 'B4', 'B5', 'B6'] Transfering          6ul from A3 to ['C1', 'C2', 'C3', 'C4', 'C5', 'C6'] Transfering          4ul from B1 to ['A1', 'B1', 'C1'] Transfering          4ul from B2 to ['A2', 'B2', 'C2'] Transfering          4ul from B3 to ['A3', 'B3', 'C3'] Transfering          4ul from B1 to ['A4', 'B4', 'C4'] Transfering          4ul from B2 to ['A5', 'B5', 'C5'] Transfering          4ul from B3 to ['A6', 'B6', 'C6']
which may not be what you want.

Here's what I would do:
  • create variables for the amount of mastermixes and cDNA you have. Also create a variable for the nr of tests you want.
  • From these variables, create a list of sources for your mm and cDNA.
  • For each mastermix, generate the list of target wells and transfer it. Keep in mind how much wells you need.
  • For each cDNA sample
    • loop through the amount of mastermixes
    • then loop through the amount of tests
    • generate the target
    • transfer everything at once
Good luck!
Reply


Messages In This Thread
Python Code Generator - by KatherineHov - Jul-24-2017, 05:58 PM
RE: Python Code Generator - by MTVDNA - Jul-24-2017, 10:00 PM
RE: Python Code Generator - by KatherineHov - Jul-25-2017, 04:13 PM
RE: Python Code Generator - by MTVDNA - Jul-25-2017, 04:52 PM
RE: Python Code Generator - by KatherineHov - Jul-25-2017, 05:40 PM
RE: Python Code Generator - by MTVDNA - Jul-25-2017, 06:03 PM
RE: Python Code Generator - by KatherineHov - Jul-25-2017, 09:16 PM
RE: Python Code Generator - by MTVDNA - Jul-25-2017, 09:54 PM
RE: Python Code Generator - by KatherineHov - Jul-26-2017, 05:15 PM
RE: Python Code Generator - by MTVDNA - Jul-26-2017, 09:56 PM
RE: Python Code Generator - by KatherineHov - Jul-27-2017, 01:22 AM
RE: Python Code Generator - by MTVDNA - Jul-27-2017, 10:04 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is the following code returning a generator expression? quazirfan 8 1,772 Apr-11-2023, 11:44 PM
Last Post: quazirfan
  Python returns generator instead of None Tawnwen 4 4,871 Mar-09-2018, 07:06 AM
Last Post: DeaD_EyE
  receive from a generator, send to a generator Skaperen 9 5,683 Feb-05-2018, 06:26 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020