Exemplo n.º 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()
Exemplo n.º 2
0
    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

    print '\n'

    biochem = Biochem(
        'WL1', 0, logger
    )  # Initialize biochemistry object - cycle-name and flowcell-number need to be passed.

    logger.info('---\t-\t--> Started %s method execution - device_utils.py' %
                sys.argv[1])
    method = sys.argv[1]  # set method to second argument

    #---------------------------------------------------------------------------------------
    #								TEMPERATURE CONTROL
    #---------------------------------------------------------------------------------------

    if method == 'set_to_temperature_control1':
        biochem.mux.set_to_temperature_control1()

    elif method == 'set_to_temperature_control2':
        biochem.mux.set_to_temperature_control2()
Exemplo n.º 3
0
if len(sys.argv) < 3:
    print '\n--> Error: not correct input!\n--> Usage: python ' + \
            'biochem_utils.py flowcell-number method\n'
    sys.exit()

else:
    import ConfigParser                    
    from biochem import Biochem            
    config = ConfigParser.ConfigParser()
    config.readfp(open(os.environ['POLONATOR_PATH'] + '/config_files/sequencing.cfg'))
    home_dir = os.environ['HOME'] + config.get("communication","home_dir")

    # Initialize biochemistry object - cycle-name and flowcell-number 
    # need to be set later
    biochem = Biochem('WL1', int(sys.argv[1]))  
    method = sys.argv[2]
    log.info("---\t-\t--> Started %s method execution - biochem_utils.py" % \
                (method))



    # usage: biochem_utils.py fcnum cycle_ligation cyclename
    # cyclename must be a valid cyclename that has a nonamer/hyb
    # valve/port mapping in sequencing.cfg
    # cyclename can be either 3 or 4 chars in length
    if method == 'cycle_ligation':
        biochem.flowcell = int(sys.argv[1])
        biochem.cycle_name = sys.argv[3]
        biochem.cycle = biochem.cycle_name[0:3]
        biochem.cycle_ligation()
Exemplo n.º 4
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()
Exemplo n.º 5
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()

    elif method is 'clean_flowcell_and_syringe':
        biochem.clean_flowcell_and_syringe()
Exemplo n.º 6
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).
Exemplo n.º 7
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] == 'abc'):
                if(1):
                    time.sleep(0.1)
                else:
                    # print cycle_list[cycle_number]
                    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(1)


                if(cycle_list[cycle_number] == 'abc'):
                    time.sleep(0.1)
                else:
                    # print cycle_list[cycle_number]
                    imager = PolonatorImager.Imager(cycle_list[cycle_number], \
                        flowcell)
                    imager.start()
Exemplo n.º 8
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()
Exemplo n.º 9
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()
Exemplo n.º 10
0
 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.
# Initialize biochemistry object - cycle-name and flowcell-number need to 
# be passed.
biochem = Biochem(sys.argv[1], int(sys.argv[2]))

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

biochem.run()   # Run polony sequencing cycle(s).
Exemplo n.º 11
0
#--------------------------- Configuration input handling ------------------------------

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

#--------------------- 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

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

#---------------------------------------------------------------------------------------
#				 				BIOCHEMISTRY CONTROL
#---------------------------------------------------------------------------------------

logger.info('***\t*\t--> Started biochemistry object testing - biochem_test.py')

#--------------------------------- Initialization --------------------------------------

#biochem.syringe_pump_init()

#biochem.reagent_block_init()				# Set reagent block cooler to constant temperature, 4 Celsius degrees.
#biochem.rotary_valve1_init()				# Initialize reagent start points in ten port rotary valve V1.
#biochem.rotary_valve2_init()				# Initialize reagent start points in ten port rotary valve V2.
#biochem.rotary_valve3_init()				# Initialize reagent start points in ten port rotary valve V3.
Exemplo n.º 12
0
#--------------------------- Configuration input handling ------------------------------

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

#--------------------- 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

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

#---------------------------------------------------------------------------------------
#                               BIOCHEMISTRY CONTROL
#---------------------------------------------------------------------------------------

logger.info('***\t*\t--> Started biochemistry object testing - biochem_test.py')

#--------------------------------- Initialization --------------------------------------

#biochem.syringe_pump_init()

#biochem.reagent_block_init()               # Set reagent block cooler to constant temperature, 4 Celsius degrees.
#biochem.rotary_valve1_init()               # Initialize reagent start points in ten port rotary valve V1.
#biochem.rotary_valve2_init()               # Initialize reagent start points in ten port rotary valve V2.
#biochem.rotary_valve3_init()               # Initialize reagent start points in ten port rotary valve V3.
Exemplo n.º 13
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', '>')
Exemplo n.º 14
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

	print '\n'

	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 - biochem_utils.py' % sys.argv[2])
	method = sys.argv[2]  # set method to second argument

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

	elif method == 'clean_V2_to_syringe':
		biochem.clean_V2_to_syringe()

	elif method == 'clean_flowcell_and_syringe':