function parseAdapterTransfers(str) {
    // A table mapping the plate position of the different indexes: 
    var adapterLocations = {1:"A1", 2:"B1", 3:"C1", 4:"D1", 5:"E1", 6:"F1",
                            7:"G1", 8:"H1", 9:"A2", 10:"B2", 11:"C2", 12:"D2",
                            13:"E2", 14:"F2", 15:"G2", 16:"H2", 18:"A3",
                            19:"B3", 20:"C3", 21:"D3", 22:"E3", 23:"F3",
                            25:"G3", 27:"H3"};
    var rowArray = parseCsv(str, ",");
    this.adapterIndexSort = function(a, b) {
        // Assumes a, b is [(string) well, (int) index]
        return a[1] - b[1];
    }
    rowArray.sort(this.adapterIndexSort);
    // Create transfer objects from sorted array:
    var transferArray = new Array();
    for(var i = 0, len = rowArray.length; i < len; i++) {
        var row = rowArray[i];
        try {
            var source = convertCoords(adapterLocations[row[1]]);
            var volume = readNumeral(row[2]);
            var destination = convertCoords(row[0]);
        } catch(e) {
            throw "UnableToParseTransferTableException:" + e;
        }
        var newTip = (i == 0) ? true : (rowArray[i-1][1] != row[1]);
        transferArray[i] = new Transfer(source, volume, destination, newTip);
    }
    return transferArray;
}
/*
 Creates an array of Transfer objects from a csv file with format:
        destination,index,volume
 where well is given in well coordinates, e.g. 'D4'
*/
Creates an array of Transfer objects from a csv file with format:
destination,index,volume
where well is given in well coordinates, e.g. 'D4'
Creates an array of Transfer objects from a csv file with format : destination index volume where well is given in well coordinates e . g . ' D4 '
function parseAdapterTransfers(str) {
    var adapterLocations = {1:"A1", 2:"B1", 3:"C1", 4:"D1", 5:"E1", 6:"F1",
                            7:"G1", 8:"H1", 9:"A2", 10:"B2", 11:"C2", 12:"D2",
                            13:"E2", 14:"F2", 15:"G2", 16:"H2", 18:"A3",
                            19:"B3", 20:"C3", 21:"D3", 22:"E3", 23:"F3",
                            25:"G3", 27:"H3"};
    var rowArray = parseCsv(str, ",");
    this.adapterIndexSort = function(a, b) {
        return a[1] - b[1];
    }
    rowArray.sort(this.adapterIndexSort);
    var transferArray = new Array();
    for(var i = 0, len = rowArray.length; i < len; i++) {
        var row = rowArray[i];
        try {
            var source = convertCoords(adapterLocations[row[1]]);
            var volume = readNumeral(row[2]);
            var destination = convertCoords(row[0]);
        } catch(e) {
            throw "UnableToParseTransferTableException:" + e;
        }
        var newTip = (i == 0) ? true : (rowArray[i-1][1] != row[1]);
        transferArray[i] = new Transfer(source, volume, destination, newTip);
    }
    return transferArray;
}
function parseAdapterTransfers ( str ) { var adapterLocations = { 1 : "A1" , 2 : "B1" , 3 : "C1" , 4 : "D1" , 5 : "E1" , 6 : "F1" , 7 : "G1" , 8 : "H1" , 9 : "A2" , 10 : "B2" , 11 : "C2" , 12 : "D2" , 13 : "E2" , 14 : "F2" , 15 : "G2" , 16 : "H2" , 18 : "A3" , 19 : "B3" , 20 : "C3" , 21 : "D3" , 22 : "E3" , 23 : "F3" , 25 : "G3" , 27 : "H3" } ; var rowArray = parseCsv ( str , "," ) ; this . adapterIndexSort = function ( a , b ) { return a [ 1 ] - b [ 1 ] ; } rowArray . sort ( this . adapterIndexSort ) ; var transferArray = new Array ( ) ; for ( var i = 0 , len = rowArray . length ; i < len ; i ++ ) { var row = rowArray [ i ] ; try { var source = convertCoords ( adapterLocations [ row [ 1 ] ] ) ; var volume = readNumeral ( row [ 2 ] ) ; var destination = convertCoords ( row [ 0 ] ) ; } catch ( e ) { throw "UnableToParseTransferTableException:" + e ; } var newTip = ( i == 0 ) ? true : ( rowArray [ i - 1 ] [ 1 ] != row [ 1 ] ) ; transferArray [ i ] = new Transfer ( source , volume , destination , newTip ) ; } return transferArray ; }
Creates an array of Transfer objects from a csv file with format:
destination,index,volume
where well is given in well coordinates, e.g.
Creates an array of Transfer objects from a csv file with format : destination index volume where well is given in well coordinates e . g .
// A table mapping the plate position of the different indexes:  // Assumes a, b is [(string) well, (int) index] // Create transfer objects from sorted array: