ttclust.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:TTClust 作者: tubiana 项目源码 文件源码
def parseArg():
    """
    This fonction will the list of pdb files and the distance
    @return: dictionnary of arguments
    Ex :
    python Cluster_Analysis.py -f *.pdb -s A:1-30:CA
    """
    arguments=argparse.ArgumentParser(description="This program was developped in order to clusterize "
                                      "molecular dynamictrajectories (Amber, gromacs, chamm, namd, PDB)")
    try:
        argcomplete.autocomplete(arguments)
    except:
        pass
    arguments.add_argument('-f', "--traj", help="trajectory file", required=True)
    arguments.add_argument('-t','--top', help="topfile", default=None)
    arguments.add_argument('-l','--logfile', help="logfile (default : clustering.log). The "
                           "name of your output file will be the basename (name before the extention "
                           "of this logfile", default="clustering")
    arguments.add_argument('-st','--select_traj', help="selection syntaxe for "
                           "Don't forget to add QUOTES besite this selection string."
                           "trajectory extraction (default : all).", default="all")
    arguments.add_argument('-sa','--select_alignement', help="selection syntaxe"
                           " for alignement (default : backbone). Don't forget to add QUOTES besite this "
                           "selection string."
                           " If you don't want aligment use \"none\".", default="backbone")
    arguments.add_argument('-sr','--select_rmsd', help="selection syntaxe for "
                           " RMSD (default : backbone). Don't forget to add QUOTES "
                           "besite this selection string.", default="backbone")

    #Clustering arguments
    arguments.add_argument('-m','--method', help="method for clustering : single "
                           "; complete; average; weighted; centroid; median. (ward)", default="ward")
    arguments.add_argument('-cc',"--cutoff", help="cutoff for clusterization from "
                           "hierarchical clusturing with Scipy", default=None)
    arguments.add_argument('-ng',"--ngroup", help="number of group asked. Use the "
                           "maxclust method to clusterize in this case", default=None)

    #Interactive mode for distance matrix:
    arguments.add_argument('-i','--interactive', help="Interactive mode for distance matrix (Y/n)", default="Y")
    args = vars(arguments.parse_args())
    return(args)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号