def newPipeline(): checkArgumentMarkerReducer() m = DnaUtils.readIUPACFile(sys.argv[1]) mapOligos = DnaUtils.readOligosFile(sys.argv[2], m) # for k in mapOligos: # for e in mapOligos[k]: # print(e) # sys.exit(1) readSingleFastQFile(sys.argv[4], 10, "log.txt", mapOligos, sys.argv[3])
def generatePlot(): checkArgumentMarkerReducer() logger.debug("IUPAC File : " + sys.argv[2]) iupacMap = DnaUtils.readIUPACFile(sys.argv[2]) logger.debug("forward MarkerMap File : " + sys.argv[3]) logger.debug("reverse MarkerMap File : " + sys.argv[4]) forwardMarkerMap = DnaUtils.readOligosFile(sys.argv[3], iupacMap) reverseMarkerMap = DnaUtils.readOligosFile(sys.argv[4], iupacMap, True) rAllOutputFileName = sys.argv[6] + ".r.csv" fAllOutputFileName = sys.argv[6] + ".f.csv" fAll = {} rAll = {} for root, dirs, files in os.walk(sys.argv[5]): for f1le in files: filePath = os.path.join(sys.argv[5], f1le) logger.debug("file : " + filePath) f, r = DnaUtils.readmarker(filePath, forwardMarkerMap, reverseMarkerMap, sys.argv[6], False) mergeMap(rAll, r) mergeMap(fAll, f) indexOsPath = filePath.rfind(os.sep) if indexOsPath == -1: indexOsPath = 0 else: indexOsPath += 1 indexOfDot = filePath.rfind(".") if indexOfDot == -1: indexOfDot = len(filePath) rOutputFileName = filePath[indexOsPath:indexOfDot] + ".r.csv" fOutputFileName = filePath[indexOsPath:indexOfDot] + ".f.csv" DnaUtils.mapToCsv(r, rOutputFileName) DnaUtils.mapToCsv(f, fOutputFileName) DnaUtils.mapToCsv(rAll, rAllOutputFileName) DnaUtils.mapToCsv(fAll, fAllOutputFileName)
def generatePlot(): checkArgumentMarkerReducer() logger.debug("IUPAC File : " + sys.argv[2]) iupacMap = DnaUtils.readIUPACFile(sys.argv[2]) logger.debug("forward MarkerMap File : " + sys.argv[3]) logger.debug("reverse MarkerMap File : " + sys.argv[4]) forwardMarkerMap = DnaUtils.readOligosFile(sys.argv[3], iupacMap) reverseMarkerMap = DnaUtils.readOligosFile(sys.argv[4], iupacMap, True) rAllOutputFileName = sys.argv[6] + ".r.csv" fAllOutputFileName = sys.argv[6] + ".f.csv" fAll = {} rAll = {} for root, dirs, files in os.walk(sys.argv[5]): for f1le in files: filePath = os.path.join(sys.argv[5], f1le) logger.debug("file : " + filePath) f,r = DnaUtils.readmarker(filePath, forwardMarkerMap, reverseMarkerMap, sys.argv[6], False) mergeMap(rAll, r) mergeMap(fAll, f) indexOsPath = filePath.rfind(os.sep) if indexOsPath == -1: indexOsPath = 0 else: indexOsPath += 1 indexOfDot = filePath.rfind(".") if indexOfDot == -1: indexOfDot = len(filePath) rOutputFileName = filePath[indexOsPath:indexOfDot] + ".r.csv" fOutputFileName = filePath[indexOsPath:indexOfDot] + ".f.csv" DnaUtils.mapToCsv(r, rOutputFileName) DnaUtils.mapToCsv(f, fOutputFileName) DnaUtils.mapToCsv(rAll, rAllOutputFileName) DnaUtils.mapToCsv(fAll, fAllOutputFileName)