
with open("D:\DanielVIB\Maize\MoreDataSets\PearsonNetworks\ConsolidateCut\ProcessesRecallNoBP.txt", "r") as fileSAC,\
        open("D:\DanielVIB\Maize\MoreDataSets\PearsonNetworks\ConsolidateCut\ProcessesRecallKrem.txt", "r") as fileKrem,\
		    open("D:\DanielVIB\Maize\MoreDataSets\PearsonNetworks\ConsolidateCut\ProcessesRecallKremNoBP.txt", "w") as outfile:

    #Load krem file into a dic
    # skip head
    next(fileKrem)
    kremRecords = {}

    for line in fileKrem:
        fields = line.split("\t")
        proc = fields[0]
        kremRecords[proc] = line

#iterateSAC to print Krem in the same format

    # print head
    outfile.write(next(fileSAC))
    for line in fileSAC:
        fields = line.split("\t")
        proc = fields[0]
        lineKrem = kremRecords.get(proc)
        outfile.write(lineKrem)



1b4bd28e41f14829f6cb760541c9114becf4863f
<mask token>

with open(
    'D:\\DanielVIB\\Maize\\MoreDataSets\\PearsonNetworks\\ConsolidateCut\\ProcessesRecallNoBP.txt'
    , 'r') as fileSAC, open(
    'D:\\DanielVIB\\Maize\\MoreDataSets\\PearsonNetworks\\ConsolidateCut\\ProcessesRecallKrem.txt'
    , 'r') as fileKrem, open(
    'D:\\DanielVIB\\Maize\\MoreDataSets\\PearsonNetworks\\ConsolidateCut\\ProcessesRecallKremNoBP.txt'
    , 'w') as outfile:
    next(fileKrem)
    kremRecords = {}
    for line in fileKrem:
        fields = line.split('\t')
        proc = fields[0]
        kremRecords[proc] = line
    outfile.write(next(fileSAC))
    for line in fileSAC:
        fields = line.split('\t')
        proc = fields[0]
        lineKrem = kremRecords.get(proc)
        outfile.write(lineKrem)


with open("D:\DanielVIB\Maize\MoreDataSets\PearsonNetworks\ConsolidateCut\ProcessesRecallNoBP.txt", "r") as fileSAC,\
        open("D:\DanielVIB\Maize\MoreDataSets\PearsonNetworks\ConsolidateCut\ProcessesRecallKrem.txt", "r") as fileKrem,\
		    open("D:\DanielVIB\Maize\MoreDataSets\PearsonNetworks\ConsolidateCut\ProcessesRecallKremNoBP.txt", "w") as outfile:

    #Load krem file into a dic
    # skip head
    next(fileKrem)
    kremRecords = {}

    for line in fileKrem:
        fields = line.split("\t")
        proc = fields[0]
        kremRecords[proc] = line

#iterateSAC to print Krem in the same format

    # print head
    outfile.write(next(fileSAC))
    for line in fileSAC:
        fields = line.split("\t")
        proc = fields[0]
        lineKrem = kremRecords.get(proc)
        outfile.write(lineKrem)


