INNER CODE UNIT · Python

natural_key

MariaNattestad/assemblytics · assemblytics/index.py:174

def natural_key(string_):
    """See http://www.codinghorror.com/blog/archives/001018.html"""
    return [int(s) if s.isdigit() else s for s in re.split(r'(\d+)', string_)]


def main():
    parser=argparse.ArgumentParser(description="Index and orient a coordinate file for dotplots.")
    parser.add_argument("-coords",help="coords.csv file from uniq_anchor.py" ,dest="coords", type=str, required=True)
    parser.add_argument("-out",help="output directory for assemblytics_* index and oriented coordinates files (default: current directory)" ,dest="out", type=str, default=".")
    parser.set_defaults(func=run)
    args=parser.parse_args()
    args.func(args)

if __name__=="__main__":
    main()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…