def histProportionTypeNeighbors(distance, dir_out, logFile): """Draw proportion type neighbor in: Distance Max study, log file_data out: excecute CMD -> draw plot""" listStruct = structure.ListSub() listStruct.append("GlobalAmine") listStruct.append("Global") for type in listStruct: file_data = dir_out + "globalProportionType/" + "proportionType" + type + str("%.2f" % distance) if tool.checkFileEmpty(file_data) == 1: continue cmd = ( pathManage.scriptR() + "barplotTypeNumberOfneighbors.R " + file_data + " " + type + " " + str("%.2f" % distance) ) print cmd logFile.write(cmd + "\n") system(cmd)
def barplotCombination(p_filin, logFile, debug=1): repScript = pathManage.scriptR() if tool.checkFileEmpty(p_filin) == 1: return cmd = repScript + "barplotCombination.R " + p_filin if debug: print cmd logFile.write(cmd + "\n") system(cmd)
def histDistance(p_filin, type_distance): """Draw CN length histogram and coplar histogram in: nameFile data, option for execute R script out: execute R script -> draw histogram distance""" if tool.checkFileEmpty(p_filin) == 1: return cmd = pathManage.scriptR() + "distance.R " + str(p_filin) + " " + str(type_distance) print cmd system(cmd)
def plotDistanceDensity(p_filin, logFile, debug=1): """Plot density""" repScript = pathManage.scriptR() if tool.checkFileEmpty(p_filin) == 1: return cmd = repScript + "densityDistance.R " + p_filin if debug: print cmd logFile.write(cmd + "\n") system(cmd)
def barplotQuantity(distance, type_study, p_filin, logFile, debug=1): """Plot count statistic in: distance for legend plot, type histogram (coplar or length), p_filin with data, type of study, logFile out: CMD in terminal -> plot """ if tool.checkFileEmpty(p_filin) == 1: return rep = pathManage.scriptR() cmd = rep + "barplotQuantity.R " + p_filin + " " + str("%.2f" % distance) + " " + type_study if debug: print cmd logFile.write(cmd + "\n") system(cmd)
def plotNbNeighbor(p_filin, logFile, debug=1): """Plot number neighbor in: distance for legend plot, type histogram (coplar or length), file with data, type of study, logFile out: CMD in terminal -> plot """ repScript = pathManage.scriptR() if tool.checkFileEmpty(p_filin) == 1: return cmd = repScript + "plotNumberNeighbor.R " + p_filin if debug: print cmd logFile.write(cmd + "\n") system(cmd)
def histGlobalProportion(dir_out, logFile): """Proportion for each atom in: log file out: execute -> CMD """ repScript = pathManage.scriptR() file = dir_out + "GlobalproportionCounterIonGlobal" if tool.checkFileEmpty(file) == 1: return cmd = repScript + "barplotProportionGlobalRef.R " + file logFile.write(cmd + "\n") print cmd system(cmd)
def histProportion(distance, dir_in, logFile): """Draw proportion type neighbor in: Distance Max study, log path_file out: excecute CMD -> draw plot""" repScript = pathManage.scriptR() listType = structure.ListSub() listType.append("Global") listType.append("GlobalAmine") for type in listType: path_file = dir_in + "globalProportionAtom/" + "proportionAtom" + type + str("%.2f" % distance) if tool.checkFileEmpty(path_file) == 1: continue cmd = repScript + "barplotQuantityGlobalAnalysis.R " + type + " " + path_file + " " + str(distance) print cmd system(cmd) logFile.write(cmd + "\n")
def barplotQuantityByAA(distance, aminoAcid, path_file, logFile): """to do""" if tool.checkFileEmpty(path_file) == 1: return rep = pathManage.scriptR() cmd = ( rep + "barplotQuantityByAA.R " + path_file + " " + str("%.2f" % distance) + " " + aminoAcid + " " + str("%.2f" % distance) ) print cmd logFile.write(cmd + "\n") system(cmd)