mavis/config
class CustomHelpFormatter
inherits argparse.ArgumentDefaultsHelpFormatter
subclass the default help formatter to stop default printing for required arguments
class RangeAppendAction
inherits argparse.Action
allows an argument to accept a range of arguments
RangeAppendAction.__init__()
def __init__(self, nmin=1, nmax=None, **kwargs):
Args
- nmin
- nmax
calculate_bam_stats()
Calculate the read stats for a library from a given bam file
def calculate_bam_stats(config: Dict, library_name: str) -> Dict:
Args
- config (
Dict
) - library_name (
str
)
Returns
Dict
add_bamstats_to_config()
Check that the input JSON config conforms to the expected schema as well as the other relevant checks such as file exsts
def add_bamstats_to_config(config: Dict):
Args
- config (
Dict
)
get_metavar()
For a given argument type, returns the string to be used for the metavar argument in add_argument
def get_metavar(arg_type):
Args
- arg_type
Examples
>>> get_metavar(bool)
'{True,False}'