config module

class mavis.config.JobSchedulingConfig(validate_memory_gb=12, default_memory_gb=10, queue='transabyss.q')[source]

Bases: object

flatten()[source]
class mavis.config.LibraryConfig(library, protocol, disease_status, bam_file, inputs, read_length, median_fragment_size, stdev_fragment_size, stranded_bam, strand_determining_read=2, **kwargs)[source]

Bases: object

classmethod build(library, protocol, bam_file, inputs, annotations=None, log=<function devnull>, distribution_fraction=0.98, sample_cap=3000, sample_bin_size=1000, sample_size=500, **kwargs)[source]
flatten()[source]
class mavis.config.PairingConfig(split_call_distance=10, contig_call_distance=0, flanking_call_distance=0, spanning_call_distance=5, max_proximity=5000, low_memory=False)[source]

Bases: object

flatten()[source]
class mavis.config.ReferenceFilesConfig(annotations=None, reference_genome=None, template_metadata=None, masking=None, aligner_reference=None, dgv_annotation=None, low_memory=False)[source]

Bases: object

flatten()[source]
class mavis.config.SummaryConfig(filter_min_remapped_reads=5, filter_min_spanning_reads=5, filter_min_flanking_reads=5, filter_min_flanking_only_reads=10, filter_min_split_reads=5, filter_min_linking_split_reads=1, flanking_call_distance=0, split_call_distance=10, contig_call_distance=0, spanning_call_distance=5)[source]

Bases: object

flatten()[source]
mavis.config.add_semi_optional_argument(argname, success_parser, failure_parser, help_msg='')[source]

for an argument tries to get the argument default from the environment variable

mavis.config.augment_parser(parser, optparser, arguments)[source]
mavis.config.cast(value, cast_func)[source]
mavis.config.get_env_variable(arg, default, cast_type=None)[source]
Parameters:arg (str) – the argument/variable name
Returns:the setting from the environment variable if given, otherwise the default value
mavis.config.read_config(filepath)[source]

reads the configuration settings from the configuration file

Parameters:filepath (str) – path to the input configuration file
Returns:list of Namespace: namespace arguments for each library
Return type:class
mavis.config.validate_and_cast_section(section, defaults)[source]
mavis.config.write_config(filename, include_defaults=False, libraries=[], conversions={}, log=<function devnull>)[source]
Parameters:
  • filename (str) – path to the output file
  • include_defaults (bool) – True if default parameters should be written to the config, False otherwise
  • libraries (list of LibraryConfig) – library configuration sections
  • conversions (dict of list by str) – conversion commands by alias name
  • log (function) – function to pass output logging to