function parseDilutionTransfers(str) {
	var rowArray = parseCsv(str, ",");
	var diluentTransferArray = [];
	var sampleTransferArray = [];
	for(var i = 0, n = rowArray.length; i < n; i++) {
		var row = rowArray[i];
		var sourceWell, sourceVolume, destinationWell, finalVolume;
		try {
			sourceWell = convertCoords(row[0]);
			sourceVolume = readNumeral(row[1]).toPrecision(3);
			destinationWell = convertCoords(row[2]);
			diluentWell = convertCoords("A1");
			diluentVolume = (readNumeral(row[3]) - sourceVolume).toPrecision(3);
		} catch(e) {
			throw "UnableToParseTransferTableException:" + e;
		}
		var newTip;
		if(sourceVolume) {
			newTip = (sampleTransferArray.length != 0);
			sampleTransferArray.push(new Transfer("sample_plate", sourceWell,
				sourceVolume, destinationWell, newTip));
		}
		if(diluentVolume > 0) {
			newTip = (diluentTransferArray.length == 0);
			diluentTransferArray.push(new Transfer("diluent_reservoir",
				diluentWell, diluentVolume, destinationWell, newTip));
		}
	}
	return diluentTransferArray.concat(sampleTransferArray);
}
/*
 Creates an array of Transfer objects from a csv file with format:
	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:
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 : sourceWell sourceVolume destinationWell finalVolume where sourceWell and destinationWell are given in plate coordinates e . g . ' D4 '
function parseDilutionTransfers(str) {
	var rowArray = parseCsv(str, ",");
	var diluentTransferArray = [];
	var sampleTransferArray = [];
	for(var i = 0, n = rowArray.length; i < n; i++) {
		var row = rowArray[i];
		var sourceWell, sourceVolume, destinationWell, finalVolume;
		try {
			sourceWell = convertCoords(row[0]);
			sourceVolume = readNumeral(row[1]).toPrecision(3);
			destinationWell = convertCoords(row[2]);
			diluentWell = convertCoords("A1");
			diluentVolume = (readNumeral(row[3]) - sourceVolume).toPrecision(3);
		} catch(e) {
			throw "UnableToParseTransferTableException:" + e;
		}
		var newTip;
		if(sourceVolume) {
			newTip = (sampleTransferArray.length != 0);
			sampleTransferArray.push(new Transfer("sample_plate", sourceWell,
				sourceVolume, destinationWell, newTip));
		}
		if(diluentVolume > 0) {
			newTip = (diluentTransferArray.length == 0);
			diluentTransferArray.push(new Transfer("diluent_reservoir",
				diluentWell, diluentVolume, destinationWell, newTip));
		}
	}
	return diluentTransferArray.concat(sampleTransferArray);
}
function parseDilutionTransfers ( str ) { var rowArray = parseCsv ( str , "," ) ; var diluentTransferArray = [ ] ; var sampleTransferArray = [ ] ; for ( var i = 0 , n = rowArray . length ; i < n ; i ++ ) { var row = rowArray [ i ] ; var sourceWell , sourceVolume , destinationWell , finalVolume ; try { sourceWell = convertCoords ( row [ 0 ] ) ; sourceVolume = readNumeral ( row [ 1 ] ) . toPrecision ( 3 ) ; destinationWell = convertCoords ( row [ 2 ] ) ; diluentWell = convertCoords ( "A1" ) ; diluentVolume = ( readNumeral ( row [ 3 ] ) - sourceVolume ) . toPrecision ( 3 ) ; } catch ( e ) { throw "UnableToParseTransferTableException:" + e ; } var newTip ; if ( sourceVolume ) { newTip = ( sampleTransferArray . length != 0 ) ; sampleTransferArray . push ( new Transfer ( "sample_plate" , sourceWell , sourceVolume , destinationWell , newTip ) ) ; } if ( diluentVolume > 0 ) { newTip = ( diluentTransferArray . length == 0 ) ; diluentTransferArray . push ( new Transfer ( "diluent_reservoir" , diluentWell , diluentVolume , destinationWell , newTip ) ) ; } } return diluentTransferArray . concat ( sampleTransferArray ) ; }
Creates an array of Transfer objects from a csv file with format:
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 : sourceWell sourceVolume destinationWell finalVolume where sourceWell and destinationWell are given in plate coordinates e . g .