Пример #1
0
else:

    import ConfigParser  # Import configuration parser class.
    from logger import Logger  # Import logger class.
    from biochem import Biochem  # Import biochecmistry class.

    #--------------------- G.007 fluidics sub-system initialization ------------------------

    config = ConfigParser.ConfigParser()
    config.readfp(open('config.txt'))

    t0 = time.time()  # get current time
    logger = Logger(config)  # initialize logger object

    biochem = Biochem(
        'WL1', int(sys.argv[1]), logger
    )  # Initialize biochemistry object - cycle-name and flowcell-number need to be passed.

    #---------------------------------------------------------------------------------------
    #				 			  FLUIDICS SUB-SYSTEM FUNCTIONS
    #---------------------------------------------------------------------------------------

    logger.info('***\t*\t--> Started %s method execution - fluidics_utils.py' %
                sys.arg[2])

    if method is 'clean_V1_to_syringe':
        biochem.clean_V1_to_syringe()

    elif method is 'clean_V2_to_syringe':
        biochem.clean_V2_to_syringe()
Пример #2
0
else:

	import ConfigParser					# Import configuration parser class.
	from logger import Logger				# Import logger class.
	from biochem import Biochem				# Import biochecmistry class.

	#--------------------- Walkameter fluidics sub-system initialization -------------------

	config = ConfigParser.ConfigParser()
	config.readfp(open('config.txt'))

	t0 = time.time()                # get current time
	print '\n'
	logger = Logger(config)         # initialize logger object

	biochem = Biochem(logger)  # Initialize biochemistry object: cycle-number need to be passed.

	#---------------------------------------------------------------------------------------
	#				FLUIDICS SUB-SYSTEM FUNCTIONS
	#---------------------------------------------------------------------------------------

	logger.info('*\t--> Started %s method execution - biochem_utils.py' % sys.argv[1])

	method = (sys.argv[1])  # assign name of requested method

	if method == 'capping_1':
		biochem.capping_1()

	elif method == 'capping_2':
		biochem.capping_2()
Пример #3
0
 For: G.007 polony sequencer design [fluidics software] at the Church Lab - 
 Genetics Department, Harvard Medical School.

 Purpose: polony_sequencing.py performs a polony sequencing biochemistry 
 consisting of given number of cycles of iteration (26)

 This software may be used, modified, and distributed freely, but this
 header may not be modified and must appear at the top of this file.
------------------------------------------------------------------------------- 
"""

import sys
from biochem import Biochem  # Import biochecmistry class.

#--------------------------- Configuration input handling ------------------------------

if len(sys.argv) < 3:
    print '\n--> Error: not correct input!\n--> Usage: python polony_sequencing.py cycle-name flowcell-number\n'
    sys.exit()

#--------------------- G.007 fluidics sub-system initialization ------------------------

t0 = time.time()  # Get current time.
biochem = Biochem(
    sys.argv[1], int(sys.argv[2])
)  # Initialize biochemistry object - cycle-name and flowcell-number need to be passed.

#-------------------------- Alternating cycle iterations -------------------------------

biochem.run()  # Run polony sequencing cycle(s).
Пример #4
0
#!/usr/local/bin/python

import sys
import time
import ConfigParser

from logger import Logger
from biochem import Biochem

config = ConfigParser.ConfigParser()
config.readfp(open('config.txt'))

t0 = time.time()
logger = Logger(config)

b = Biochem('WL1', 0, logger)

#b.mux.discrete_valve4_open()
b.mux.discrete_valve4_close()
Пример #5
0
import commands
import ConfigParser

from logger import Logger
from biochem import Biochem

print '\nINFO\t *\t--> START PRIMER WALKING MAIN - walking_main.py\n'

t0 = time.time()  # get current time

config = ConfigParser.ConfigParser()
config.readfp(open('config.txt'))
cycle_iter = eval(config.get("cycle_constants", "cycle_iter"))

logger = Logger(config)  # initialize logger object
biochem = Biochem(logger)  # initialize biochemistry object

if biochem.speech_option == 1:
    commands.getstatusoutput('mplayer -ao pulse ../../../speech/welcome.wav')
    commands.getstatusoutput('mplayer -ao pulse ../../../speech/start.wav')

logger.info("*\t--> Started primer walking")

while (biochem.cycle < cycle_iter):
    biochem.cycle += 1

    if biochem.speech_option == 1:
        commands.getstatusoutput('mplayer -ao pulse ../../../speech/cycle_' +
                                 str(biochem.cycle) + '.wav')
    biochem.run()
Пример #6
0
        cycle_number_bio = 0
        flowcell = 0
        cycle_number_im = 0

        if (installed_flowcells == 1):
            for cycle_number in range(0, cycle_list_length):
                cycle_list[cycle_number] = cycle_list[cycle_number].strip()
                logger.info("---\t-\t--> Cycle_list key: %s" %
                            cycle_list[cycle_number])
                logger.info("---\t-\t--> Cycle number: %i" % cycle_number)
                cycle_list2 = cycle_list

                if (cycle_list[cycle_number] == 'AM1g'):
                    time.sleep(0.1)
                else:
                    biochem = Biochem(cycle_list[cycle_number], flowcell,
                                      logger)
                    biochem.start()

                    while (biochem.isAlive()):
                        session.parse_read_string('y.ob[2]=1', '>')
                        session.parse_read_string('y.ob[2]=0', '>')
                        time.sleep(0.1)

#				if(cycle_list[cycle_number] == 'WL1'):
#					time.sleep(0.1)
#				else:
#					imager = PolonatorImager.Imager(cycle_list[cycle_number], flowcell)
#					imager.start()
#
#					while(imager.isAlive()):
#						session.parse_read_string('y.ob[1]=1', '>')