Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #returns the ratio of DNA:Water for DNA dilutions for a given amount of DNA.
  2. def dilution_maker(conc, DNA_amount=50):
  3. dil_factor=1
  4. if conc>DNA_amount:
  5. dil_factor=conc//DNA_amount
  6. if conc%DNA_amount>0:
  7. dil_factor+=1
  8. dil_conc=conc/dil_factor
  9. #print(dil_conc) #prints the final diluted concentration
  10. return(str(conc)+ " " + "(1:" + str(dil_factor-1)+")") # return conc, dil_factor, dil_conc in the format '[conc] ([DNA:Water])'
  11.  
  12. # example using a sample with a concentration of 233ng/ul and required amount of 50ng for the assay.
  13. dilution_maker(233,50)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement