function parseDilutionTransfers(str) {
	var rowArray = parseCsv(str, ",");
	// Order the arrray on plate ID:
	rowArray.sort(sortRowsByPlate);
	var transferArrays = [];
	var plateSet = {};
	var diluentIndex;
	var sourceIndex;
	for(var i in rowArray) {
		var row = rowArray[i];
		var sourcePlate, sourceWell, sourceVolume, destinationWell;
		try {
			sourcePlate = row[0];
			sourceWell = convertCoordsRegExp(row[1]);
			sourceVolume = parseNumber(row[2], 3);
			destinationWell = convertCoordsRegExp(row[3]);
			diluentWell = convertCoords("A1");
			// The substraction float may contain many dec so it is rounded:
			diluentVolume = +(parseNumber(row[4], 3) - sourceVolume).toFixed(3);
		} catch(e) {
			throw "UnableToParseTransferTableException:" + e;
		}
		// Each diluentTransferArray must preceed its 
		// sourceTransferArray. Make sure the order is correct by using
		// plateIndex
		if(!(sourcePlate in plateSet)) {
			plateSet[sourcePlate] = sourcePlate;
			diluentIndex = transferArrays.push([]) - 1;
			sourceIndex = transferArrays.push([]) - 1;
		}
		var newTip;
		if(sourceVolume > 0) {
			newTip = (transferArrays[sourceIndex].length != 0);
			transferArrays[sourceIndex].push(new Transfer(sourcePlate, sourceWell,
				sourceVolume, destinationWell, newTip));
		}
		if(diluentVolume > 0) {
			newTip = (transferArrays[diluentIndex].length == 0);
			transferArrays[diluentIndex].push(new Transfer("diluent_reservoir",
				diluentWell, diluentVolume, destinationWell, newTip));
		}
	}
	return transferArrays;
}
/*
 Creates an array of Transfer objects from a csv file with format:
	sourcePlate,sourceWell,sourceVolume,destinationWell,finalVolume
 where sourceWell and destinationWell are given in plate coordinates, e.g. 'D4'
*/
Creates an array of Transfer objects from a csv file with format:
sourcePlate,sourceWell,sourceVolume,destinationWell,finalVolume
where sourceWell and destinationWell are given in plate coordinates, e.g. 'D4'
Creates an array of Transfer objects from a csv file with format : sourcePlate sourceWell sourceVolume destinationWell finalVolume where sourceWell and destinationWell are given in plate coordinates e . g . ' D4 '
function parseDilutionTransfers(str) {
	var rowArray = parseCsv(str, ",");
	rowArray.sort(sortRowsByPlate);
	var transferArrays = [];
	var plateSet = {};
	var diluentIndex;
	var sourceIndex;
	for(var i in rowArray) {
		var row = rowArray[i];
		var sourcePlate, sourceWell, sourceVolume, destinationWell;
		try {
			sourcePlate = row[0];
			sourceWell = convertCoordsRegExp(row[1]);
			sourceVolume = parseNumber(row[2], 3);
			destinationWell = convertCoordsRegExp(row[3]);
			diluentWell = convertCoords("A1");
			diluentVolume = +(parseNumber(row[4], 3) - sourceVolume).toFixed(3);
		} catch(e) {
			throw "UnableToParseTransferTableException:" + e;
		}
		if(!(sourcePlate in plateSet)) {
			plateSet[sourcePlate] = sourcePlate;
			diluentIndex = transferArrays.push([]) - 1;
			sourceIndex = transferArrays.push([]) - 1;
		}
		var newTip;
		if(sourceVolume > 0) {
			newTip = (transferArrays[sourceIndex].length != 0);
			transferArrays[sourceIndex].push(new Transfer(sourcePlate, sourceWell,
				sourceVolume, destinationWell, newTip));
		}
		if(diluentVolume > 0) {
			newTip = (transferArrays[diluentIndex].length == 0);
			transferArrays[diluentIndex].push(new Transfer("diluent_reservoir",
				diluentWell, diluentVolume, destinationWell, newTip));
		}
	}
	return transferArrays;
}
function parseDilutionTransfers ( str ) { var rowArray = parseCsv ( str , "," ) ; rowArray . sort ( sortRowsByPlate ) ; var transferArrays = [ ] ; var plateSet = { } ; var diluentIndex ; var sourceIndex ; for ( var i in rowArray ) { var row = rowArray [ i ] ; var sourcePlate , sourceWell , sourceVolume , destinationWell ; try { sourcePlate = row [ 0 ] ; sourceWell = convertCoordsRegExp ( row [ 1 ] ) ; sourceVolume = parseNumber ( row [ 2 ] , 3 ) ; destinationWell = convertCoordsRegExp ( row [ 3 ] ) ; diluentWell = convertCoords ( "A1" ) ; diluentVolume = + ( parseNumber ( row [ 4 ] , 3 ) - sourceVolume ) . toFixed ( 3 ) ; } catch ( e ) { throw "UnableToParseTransferTableException:" + e ; } if ( ! ( sourcePlate in plateSet ) ) { plateSet [ sourcePlate ] = sourcePlate ; diluentIndex = transferArrays . push ( [ ] ) - 1 ; sourceIndex = transferArrays . push ( [ ] ) - 1 ; } var newTip ; if ( sourceVolume > 0 ) { newTip = ( transferArrays [ sourceIndex ] . length != 0 ) ; transferArrays [ sourceIndex ] . push ( new Transfer ( sourcePlate , sourceWell , sourceVolume , destinationWell , newTip ) ) ; } if ( diluentVolume > 0 ) { newTip = ( transferArrays [ diluentIndex ] . length == 0 ) ; transferArrays [ diluentIndex ] . push ( new Transfer ( "diluent_reservoir" , diluentWell , diluentVolume , destinationWell , newTip ) ) ; } } return transferArrays ; }
Creates an array of Transfer objects from a csv file with format:
sourcePlate,sourceWell,sourceVolume,destinationWell,finalVolume
where sourceWell and destinationWell are given in plate coordinates, e.g.
Creates an array of Transfer objects from a csv file with format : sourcePlate sourceWell sourceVolume destinationWell finalVolume where sourceWell and destinationWell are given in plate coordinates e . g .
// Order the arrray on plate ID: // The substraction float may contain many dec so it is rounded: // Each diluentTransferArray must preceed its  // sourceTransferArray. Make sure the order is correct by using // plateIndex