scripts/preprocessing/relabel_seed.py
def parse_arguments():
    """
    Basic argument parsing

    return: Argparse parser object
    """

    parser = argparse.ArgumentParser(description='Script to relabel SEED alignments')

    required_arguments = parser.add_argument_group("required arguments")
    required_arguments.add_argument("--seed", help="SEED alignment in stockholm format to relabel", type=str)

    # mutually exclusive arguments
    mutually_exclusive_arguments = parser.add_mutually_exclusive_group()
    mutually_exclusive_arguments.add_argument("--seqdb",
                                              help="Sequence file in fasta format from where to extract coordinates",
                                              type=str)

    # group together related arguments
    rnac_option_group = parser.add_argument_group("rnacentral options")
    rnac_option_group.add_argument("--rnac", help="Sets RNAcentral as the source sequence database",
                                   action="store_true")
    rnac_option_group.add_argument("--expert-db", help="Name of experct RNAcentral database",
                                   action="store")
    rnac_option_group.add_argument("--md5", help="Map sequences based on md5 hashes",
                                   action="store_true")
    rnac_option_group.add_argument("--clean-seed", help="Ommit any SEED sequences not matching RNAcentral ones",
                                   action="store_true")

    parser.add_argument('--no-gaps', help='Remove all gap columns from the alignment', action="store_true")
    parser.add_argument('--fix-zeros', help='Replaces all 0 starts with 1s', action="store_true")

    return parser

    Basic argument parsing

    return: Argparse parser object
    
Basic argument parsing
return: Argparse parser object
Basic argument parsing return : Argparse parser object
def parse_arguments():
    parser = argparse.ArgumentParser(description='Script to relabel SEED alignments')
    required_arguments = parser.add_argument_group("required arguments")
    required_arguments.add_argument("--seed", help="SEED alignment in stockholm format to relabel", type=str)
    mutually_exclusive_arguments = parser.add_mutually_exclusive_group()
    mutually_exclusive_arguments.add_argument("--seqdb",
                                              help="Sequence file in fasta format from where to extract coordinates",
                                              type=str)
    rnac_option_group = parser.add_argument_group("rnacentral options")
    rnac_option_group.add_argument("--rnac", help="Sets RNAcentral as the source sequence database",
                                   action="store_true")
    rnac_option_group.add_argument("--expert-db", help="Name of experct RNAcentral database",
                                   action="store")
    rnac_option_group.add_argument("--md5", help="Map sequences based on md5 hashes",
                                   action="store_true")
    rnac_option_group.add_argument("--clean-seed", help="Ommit any SEED sequences not matching RNAcentral ones",
                                   action="store_true")
    parser.add_argument('--no-gaps', help='Remove all gap columns from the alignment', action="store_true")
    parser.add_argument('--fix-zeros', help='Replaces all 0 starts with 1s', action="store_true")
    return parser
def parse_arguments ( ) : parser = argparse . ArgumentParser ( description = 'Script to relabel SEED alignments' ) required_arguments = parser . add_argument_group ( "required arguments" ) required_arguments . add_argument ( "--seed" , help = "SEED alignment in stockholm format to relabel" , type = str ) mutually_exclusive_arguments = parser . add_mutually_exclusive_group ( ) mutually_exclusive_arguments . add_argument ( "--seqdb" , help = "Sequence file in fasta format from where to extract coordinates" , type = str ) rnac_option_group = parser . add_argument_group ( "rnacentral options" ) rnac_option_group . add_argument ( "--rnac" , help = "Sets RNAcentral as the source sequence database" , action = "store_true" ) rnac_option_group . add_argument ( "--expert-db" , help = "Name of experct RNAcentral database" , action = "store" ) rnac_option_group . add_argument ( "--md5" , help = "Map sequences based on md5 hashes" , action = "store_true" ) rnac_option_group . add_argument ( "--clean-seed" , help = "Ommit any SEED sequences not matching RNAcentral ones" , action = "store_true" ) parser . add_argument ( '--no-gaps' , help = 'Remove all gap columns from the alignment' , action = "store_true" ) parser . add_argument ( '--fix-zeros' , help = 'Replaces all 0 starts with 1s' , action = "store_true" ) return parser
Basic argument parsing
return: Argparse parser object
Basic argument parsing return : Argparse parser object
"""
    Basic argument parsing

    return: Argparse parser object
    """ # mutually exclusive arguments # group together related arguments