function parseDilutionTransfersSingle(str) {
	var rowArray = parseCsv(str, ",");
	// Order the arrray on plate ID:
	rowArray.sort(transferSorter(0,1));
	var transferArrays = [];
	var plateSet = {};
	var sourceIndex;
	var diluentWell = convertCoords("A1");
	for(var i=0, n=rowArray.length; i<n; i++) {
		var row = rowArray[i];
		var sourcePlate, sourceWell, sourceVolume;
		var destinationPlate, destinationWell, diluentVolume;
		try {
			sourcePlate = row[0].trim();
			sourceWell = convertCoordsRegExp(row[1]);
			sourceVolume = parseNumber(row[2], 3);
			// Temporary fix to also handle format with destination plate ID:
			try {
				destinationWell = convertCoordsRegExp(row[4]);
				destinationPlate = row[3].trim();
				// The substraction float may contain many dec so it is rounded:
				diluentVolume = +(parseNumber(row[5], 3) - sourceVolume).toFixed(3);
			} catch(e) {
				destinationPlate = "diluted_plate";
				destinationWell = convertCoordsRegExp(row[3]);
				// The substraction float may contain many dec so it is rounded:
				diluentVolume = +(parseNumber(row[4], 3) - sourceVolume).toFixed(3);
			}
		} catch(e) {
			throw "UnableToParseTransferTableException:" + e;
		}
		if(!(sourcePlate in plateSet)) {
			plateSet[sourcePlate] = sourcePlate;
			sourceIndex = transferArrays.push([]) - 1;
		}
		if(diluentVolume > 0 || sourceVolume > 0) {
			transferArrays[sourceIndex].push(new Transfer(sourcePlate, sourceWell,
				sourceVolume, destinationWell, destinationPlate, true, diluentVolume));
		}
	}
	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'
 This variant puts the diluent volume in the same Transfer object.
*/
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'
This variant puts the diluent volume in the same Transfer object.
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 ' This variant puts the diluent volume in the same Transfer object .
function parseDilutionTransfersSingle(str) {
	var rowArray = parseCsv(str, ",");
	rowArray.sort(transferSorter(0,1));
	var transferArrays = [];
	var plateSet = {};
	var sourceIndex;
	var diluentWell = convertCoords("A1");
	for(var i=0, n=rowArray.length; i<n; i++) {
		var row = rowArray[i];
		var sourcePlate, sourceWell, sourceVolume;
		var destinationPlate, destinationWell, diluentVolume;
		try {
			sourcePlate = row[0].trim();
			sourceWell = convertCoordsRegExp(row[1]);
			sourceVolume = parseNumber(row[2], 3);
			try {
				destinationWell = convertCoordsRegExp(row[4]);
				destinationPlate = row[3].trim();
				diluentVolume = +(parseNumber(row[5], 3) - sourceVolume).toFixed(3);
			} catch(e) {
				destinationPlate = "diluted_plate";
				destinationWell = convertCoordsRegExp(row[3]);
				diluentVolume = +(parseNumber(row[4], 3) - sourceVolume).toFixed(3);
			}
		} catch(e) {
			throw "UnableToParseTransferTableException:" + e;
		}
		if(!(sourcePlate in plateSet)) {
			plateSet[sourcePlate] = sourcePlate;
			sourceIndex = transferArrays.push([]) - 1;
		}
		if(diluentVolume > 0 || sourceVolume > 0) {
			transferArrays[sourceIndex].push(new Transfer(sourcePlate, sourceWell,
				sourceVolume, destinationWell, destinationPlate, true, diluentVolume));
		}
	}
	return transferArrays;
}
function parseDilutionTransfersSingle ( str ) { var rowArray = parseCsv ( str , "," ) ; rowArray . sort ( transferSorter ( 0 , 1 ) ) ; var transferArrays = [ ] ; var plateSet = { } ; var sourceIndex ; var diluentWell = convertCoords ( "A1" ) ; for ( var i = 0 , n = rowArray . length ; i < n ; i ++ ) { var row = rowArray [ i ] ; var sourcePlate , sourceWell , sourceVolume ; var destinationPlate , destinationWell , diluentVolume ; try { sourcePlate = row [ 0 ] . trim ( ) ; sourceWell = convertCoordsRegExp ( row [ 1 ] ) ; sourceVolume = parseNumber ( row [ 2 ] , 3 ) ; try { destinationWell = convertCoordsRegExp ( row [ 4 ] ) ; destinationPlate = row [ 3 ] . trim ( ) ; diluentVolume = + ( parseNumber ( row [ 5 ] , 3 ) - sourceVolume ) . toFixed ( 3 ) ; } catch ( e ) { destinationPlate = "diluted_plate" ; destinationWell = convertCoordsRegExp ( row [ 3 ] ) ; diluentVolume = + ( parseNumber ( row [ 4 ] , 3 ) - sourceVolume ) . toFixed ( 3 ) ; } } catch ( e ) { throw "UnableToParseTransferTableException:" + e ; } if ( ! ( sourcePlate in plateSet ) ) { plateSet [ sourcePlate ] = sourcePlate ; sourceIndex = transferArrays . push ( [ ] ) - 1 ; } if ( diluentVolume > 0 || sourceVolume > 0 ) { transferArrays [ sourceIndex ] . push ( new Transfer ( sourcePlate , sourceWell , sourceVolume , destinationWell , destinationPlate , true , diluentVolume ) ) ; } } 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: // Temporary fix to also handle format with destination plate ID: // The substraction float may contain many dec so it is rounded: // The substraction float may contain many dec so it is rounded: