Пример #1
0
def main():
    if len(sys.argv) < 3:
        print("usage: merge-mat.py mat_1[,mat_2..] out_mat\n\n"
              "Merge multiple files with blockades into one")
        return 1

    blockades = []
    for mat_file in sys.argv[1:-1]:
        blockades.extend(read_mat(mat_file))

    write_mat(blockades, sys.argv[-1])
    return 0
Пример #2
0
def main():
    if len(sys.argv) != 3:
        print("usage: protein-label.py mat_file prot_sequence\n\n"
              "Add protein sequence record into the mat file "
              "with blockades", file=sys.stderr)
        return 1

    blockades = read_mat(sys.argv[1])
    for blockade in blockades:
        blockade.peptide = sys.argv[2]
    write_mat(blockades, sys.argv[1])
    return 0
Пример #3
0
def main():
    if len(sys.argv) < 3:
        print("usage: merge-mat.py mat_1[,mat_2..] out_mat\n\n"
              "Merge multiple files with blockades into one")
        return 1

    blockades = []
    for mat_file in sys.argv[1:-1]:
        blockades.extend(read_mat(mat_file))

    write_mat(blockades, sys.argv[-1])
    return 0
Пример #4
0
def main():
    if len(sys.argv) != 4:
        print("usage: flip-blockades.py blockades_in model_file flipped_out\n\n"
              "Orients blockade signals according to the AA order "
              "in the protein of origin")
        return 1

    blockades_in = sys.argv[1]
    blockades_out = sys.argv[3]
    svr_file = sys.argv[2]

    blockades = read_mat(blockades_in)
    rev_blockades = flip(blockades, svr_file)
    write_mat(rev_blockades, blockades_out)

    return 0