示例#1
0
    # Print output header for the <A_file>
    output_header(args, fileA)

    # Foreach <B_files>
    if args['-c']: FH = open('testFiles/summary', 'w')
    mnRandom = 0
    for fileB_name in args['<B_files>']:

        # Create a Dataset object based on the <B_file>
        fileB = Dataset(fileB_name)
        fileB.calcDataCoords(refGenome)
        if args['-v'] in ['all', 'fileB']: fileB.printDataset('fileB')

        # Compare <A_file> and <B_file>
        matrix = fileA.compareData(fileB, args)
        matrix.addGenomeSize(refGenome.getSize()[1])

        randMatrices = []
        # Foreach M number of randomizations
        for mRandom in range(int(args['-m'])):

            # Create a randomization of the <A_file>
            randFileA = fileA.randomize(refGenome, args,
                                        'randGenomeA_%d' % mRandom)
            if args['-v'] in ['all', 'remap']:
                randFileA.printDataset('randFileA_%d' % mRandom)

            # Foreach N number of randomizations
            for nRandom in range(int(args['-n'])):

                # Create a randomization of the <B_file>
示例#2
0
    # Print output header for the <A_file>
    output_header(args, args['<A_file>'])

    # Foreach <B_files>
    if args['-c']: FH = open('testFiles/summary', 'w')
    mnRandom = 0
    for fileB_name in args['<B_files>']:

        # Create a Dataset object based on the <B_file>
        fileB = Dataset(fileB_name)
        fileB.calcDataCoords(refGenome)
        if args['-v'] in ['all', 'fileB']: fileB.printDataset('fileB')

        # Compare <A_file> and <B_file>
        matrix = fileA.compareData(fileB, args)
        matrix.addGenomeSize(refGenome.getSize()[1])

        randMatrices = []
        # Foreach M number of randomizations
        for mRandom in range(int(args['-m'])):

            # Create a randomization of the <A_file>
            randFileA = fileA.randomize(refGenome, args,
                                        'randGenomeA_%d' % mRandom)
            if args['-v'] in ['all', 'remap']:
                randFileA.printDataset('randFileA_%d' % mRandom)

            # Foreach N number of randomizations
            for nRandom in range(int(args['-n'])):

                # Create a randomization of the <B_file>