Пример #1
0
def plotAngle(l_p_filin, debug=1):
    """Excecute commande for draw angle plot
    in: distance MAX and log file
    out: Execute CMD -> draw plot
    """
    for p_filin in l_p_filin:
        # # # #         substruct = p_filin.split ("_")[-1]

        # do not need with the new criterion
        # #         if substruct == "Imidazole" or substruct == "Pyridine" or substruct == "Secondary" :
        # #             cmd_3d = pathManage.scriptR() + "angle3D_Secondary.R " + p_filin
        # #         elif substruct == "Tertiary" :
        # #             cmd_3d = pathManage.scriptR() + "angle3D_Tertiary.R " + p_filin

        # every structure
        cmd_density = pathManage.scriptR() + "angle_density.R " + p_filin + "&"
        cmd_distribution = pathManage.scriptR() + "angle_distribution.R " + p_filin + "&"
        cmdBarplot = pathManage.scriptR() + "angle_barplot.R " + p_filin + " 5"
        cmd_densityandhist = pathManage.scriptR() + "angleVSDistance.R " + p_filin

        if debug == 1:
            print cmd_density
            print cmdBarplot
            print cmd_distribution
            print cmd_densityandhist

        system(cmdBarplot)
        system(cmd_density)
        system(cmd_distribution)
        system(cmd_densityandhist)
Пример #2
0
def InteractionProportion(p_filin):

    cmd_by_sub = pathManage.scriptR() + "proportionBySub.R " + p_filin
    print cmd_by_sub
    system(cmd_by_sub)

    cmd_all = pathManage.scriptR() + "proportionAllSubs.R " + p_filin
    print cmd_all
    system(cmd_all)
Пример #3
0
def AFCBarplot(p_filin, logFile, verbose=1):

    cmd = pathManage.scriptR() + "AFCNeighbor.R " + p_filin
    system(cmd)
    if verbose == 1:
        print cmd
    logFile.write(cmd)
Пример #4
0
def proportionAtomClassNeighbor(p_filin, logFile, verbose=1):

    cmd = pathManage.scriptR() + "AnalysisNeighbor.R " + p_filin + " " + p_filin.split("/")[-1].split("_")[-1]
    system(cmd)
    if verbose == 1:
        print cmd
    logFile.write(cmd + "\n")
Пример #5
0
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)
Пример #6
0
def histNeigbor(dir_in, logFile):

    l_study = structure.ListSub()
    l_study.append("global")

    for substruct in l_study:
        cmd = (
            pathManage.scriptR()
            + "AnalysisNeighbor.R "
            + dir_in
            + "neigbhor/"
            + "neighbor_"
            + substruct
            + " "
            + dir_in
            + "neigbhor/"
            + "distance_"
            + substruct
            + " "
            + substruct
        )
        cmd_hist = pathManage.scriptR() + "histAngle.R " + dir_in + "neigbhor/" + "angle_neighbor_" + substruct

        if substruct == "Primary":
            nb = 5
        if substruct == "Secondary" or substruct == "Imidazole":
            nb = 4
        if substruct == "Tertiary":
            nb = 3
        else:
            nb = 7

        cmd_barplot = (
            pathManage.scriptR() + "barplotNeighbor.R " + dir_in + "neigbhor/" + "barplot_" + substruct + " " + str(nb)
        )

        print cmd
        print cmd_hist
        print cmd_barplot

        system(cmd_barplot)
        system(cmd)
        system(cmd_hist)

    for i in range(1, 8):
        AFC(dir_in + "neigbhor/", str(i))
Пример #7
0
def plot3D(p_file_coord, option="local"):

    cmd = pathManage.scriptR() + "scatter3D.R " + p_file_coord + " " + option
    print cmd
    system(cmd)

    # remove png temp
    system("rm " + path.dirname(p_file_coord) + "/*.png")
Пример #8
0
def barplotResDist(p_filin, logFile):
    """Draw barplot proportion residue
    in: log file_side
    out: execute CMD"""

    cmd = pathManage.scriptR() + "barplotResidueDistance.R " + p_filin + " all"
    logFile.write(cmd + "\n")
    system(cmd)
    print cmd
Пример #9
0
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)
Пример #10
0
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)
Пример #11
0
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)
Пример #12
0
def histProportionType(distanceMax, dir_out, logFile):
    """Draw proportion type graphe
    in: Distance Max study, log file
    out: excecute CMD -> draw plot"""

    repScript = pathManage.scriptR()

    cmd = repScript + "barplotPercentClasse.R " + dir_out
    print cmd
    logFile.write(cmd + "\n")
    system(cmd)
Пример #13
0
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)
Пример #14
0
def CorInteractionVSNbNeighbours(p_file_interact, p_file_nb_neighbor, pr_result):

    cmd_run = (
        pathManage.scriptR()
        + "CorInteractVSneighbour.R "
        + p_file_interact
        + " "
        + p_file_nb_neighbor
        + " "
        + pr_result
    )
    print cmd_run
    system(cmd_run)
Пример #15
0
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)
Пример #16
0
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)
Пример #17
0
def MergeProportionAndDataset(p_atleast1, p_notatleast1, p_atleast2, p_notatleast2, pr_out):

    cmd_R = (
        pathManage.scriptR()
        + "mergeBarplotAndDataset.R "
        + str(p_atleast1)
        + " "
        + str(p_notatleast1)
        + " "
        + str(p_atleast2)
        + " "
        + str(p_notatleast2)
        + " "
        + str(pr_out)
    )
    print cmd_R
    system(cmd_R)
Пример #18
0
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")
Пример #19
0
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)
Пример #20
0
def CorpKaVSNb(p_file_pka):

    cmd_run = pathManage.scriptR() + "corNbVSPKA.R " + p_file_pka

    print cmd_run
    system(cmd_run)
Пример #21
0
def MeansNumberNeighbors(p_filout):

    cmd_run = pathManage.scriptR() + "barplotMeans.R " + str(p_filout)
    print cmd_run
    system(cmd_run)
Пример #22
0
def HistAngle(p_filin):

    cmd_hist = pathManage.scriptR() + "plotAngleCriteria.R " + p_filin
    print cmd_hist

    system(cmd_hist)
Пример #23
0
def plotAngleVs(path_filin):

    cmd = pathManage.scriptR() + "plotAngleVS.R " + path_filin
    print cmd
    system(cmd)
Пример #24
0
def MergeProportionInteractAtLeasNotAtLeast(p_atleast, p_notatleast, pr_out):

    cmd_R = pathManage.scriptR() + "mergeBarplot.R " + str(p_atleast) + " " + str(p_notatleast) + " " + pr_out
    print cmd_R
    system(cmd_R)
Пример #25
0
def WaterMediated(p_filin):

    cmd = pathManage.scriptR() + "barplotWaterMediated.R " + p_filin
    print cmd
    system(cmd)
Пример #26
0
def multiHist(pr_filin):

    cmd = pathManage.scriptR() + "multihist.R " + pr_filin
    print cmd
    system(cmd)
Пример #27
0
def waterType(path_file, verbose=1):

    cmd = pathManage.scriptR() + "plotWaterQuantity.R " + path_file
    if verbose == 1:
        print cmd
    system(cmd)
Пример #28
0
def DistVSAngleNeighbor(p_filin):

    cmd_area = pathManage.scriptR() + "plotAngleVSDistCombi.R " + p_filin
    print cmd_area

    system(cmd_area)
Пример #29
0
def AFC(pr_neighbors, number_neighbor):

    cmd = pathManage.scriptR() + "AFCNeighbor.R " + pr_neighbors + " " + str(number_neighbor)
    print cmd
    system(cmd)
Пример #30
0
def barplotLenBond(path_filin):

    cmd = pathManage.scriptR() + "boxplotBond.R " + path_filin
    print cmd
    system(cmd)