Advertisement
Guest User

test_bioplate.py

a guest
Jun 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.86 KB | None | 0 0
  1. import sys
  2. import os
  3. #os.sys.path.append("/storage/emulated/0/programming/BioPlate")
  4. #sys.path.append("/storage/emulated/0/programming/BioPlate")
  5. #print(sys.path)
  6. import numpy as np
  7. import  xlsxwriter
  8. import re
  9. from pyexcel_xlsx import get_data, save_data
  10. import openpyxl
  11. from BioPlate import BioPlate
  12. from BioPlate.writer.to_excel import BioPlateToExcel
  13. from BioPlate.writer.from_excel import BioPlateFromExcel
  14. #from BioPlate.utilitis import dimension, dict_unique, remove_empty_iterate, like_read_count, nested_dict_to_list, _LETTER
  15. from BioPlate.array import BioPlateArray
  16. #from BioPlate.Plate import BioPlate
  17. from BioPlate.matrix import BioPlateMatrix
  18. from BioPlate.manipulation import BioPlateManipulation
  19. from BioPlate.iterate import BioPlateIterate
  20. from BioPlate.count import BioPlateCount
  21. from BioPlate.database.plate_historic_db import PlateHist
  22. from BioPlate.stack import BioPlateStack
  23. from timeit import timeit
  24. import time
  25. import inspect
  26. from string import ascii_uppercase
  27. from collections import namedtuple
  28.  
  29.  
  30.  
  31. #cd /storage/emulated/0/programming/BioPlate/BioPlate && mypy --ignore-missing-import array.py
  32. #cd /storage/emulated/0/programming/BioPlate && mypy --ignore-missing-import -p BioPlate
  33. #cd /storage/emulated/0/programming/BioPlate && py.test --cov=BioPlate tests/&& coverage html
  34. # cd /storage/emulated/0/programming/BioPlate/ && pylint BioPlate && pylint-json2html -f jsonextended -o pylint_report.html
  35. # cd /storage/emulated/0/programming/BioPlate/build_docs && make html
  36.  
  37.  
  38. v = {
  39.             "A[2,8]": "VC",
  40.             "H[2,8]": "MS",
  41.             "1-4[B,G]": ["MLR", "NT", "1.1", "1.2"],
  42.             "E-G[8,11]": ["Val1", "Val2", "Val3"],
  43.         }
  44.  
  45.  
  46.  
  47. plate = BioPlate(12, 8)
  48. #stack = BioPlate(2, 12, 8)
  49. Ins = BioPlate(12,8,inserts=True)
  50. #plate.set('A-C[1-5]', ["Test1", "Test2", "Test3"])
  51. #plate.set("6-8[A-B]", ["Bob1", "bob2",  "bob3"])
  52. #plate.set("A[1-3]", ["_mo1", "_mo2", "_mo3"], merge=True)
  53. #plate.set({"H[2-4]" : "tutu", "2H" :"_roulio"}, merge = True)
  54. #stack.set(0, {"H[2-4]" : "tutu", "2H" :"_roulio"}, merge = True)
  55. #plate.set("B", "BG")
  56. #plate.get("B2", "G3")
  57. #print(stack.get(0, "H2"))
  58. #Ins.top.set("B", "mam")
  59. #print(BioPlateMatrix("A-C[4-5]"))
  60. #print(Ins.top["A-C[4-5]"])
  61. #Ins.top.set("A-C[4-5]", ["_3", "_4", "_5"], merge=True)
  62. #plate.set("B5", ["martin", "maurice"])
  63. #print(BioPlateMatrix({"H[2-4]" : "tutu", "11[E-F]" :"roulio"}))
  64. #plate.set("A[2-4]", ["test23", "test43"])
  65. #plate.set("2-3[B-C]", "gogo")
  66. #print(plate["H[2-4]"])
  67. #plate["B-E[4-7]"] = ["master", "bob", "u", "m",]
  68. #plate["4-6[B-D]"] = ["lol", "lo", "l"]
  69. #stack[0, "B[2-6]"] = "test"
  70. #Ins["top", "E[4-6]"] = "bibi"
  71. #Ins.top["B3"] = 12
  72. #plate["A-B[2-5]"] = "mama" #, "papa"]
  73. #print(stack)
  74. #print(stack[0, "B6"])
  75. #print(stack)
  76. #print(plate)
  77. #print(Ins[0, 1:4])
  78. #print(Ins)
  79. #print(Ins["top", "E4"])
  80. #print(plate.set("2[B,E]", "Test"))
  81. #ins["bot", "B-D[6-9]"] = ["t1", "t2", "t3"]
  82. print(list(BioPlateIterate(Ins, OnlyValue=True)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement