BCCDC-PHL FluViewer
Indices and tables
fluviewer.fluviewer
This module controls the overall flow of analysis by running each analysis stage.
It runs the following analysis stages:
Read Normalization
Assemble Contigs
BLAST Contigs
Scaffolding
Read Mapping
Variant Calling
Consensus Calling
Summary Reporting
fluviewer.analysis
This module includes the steps required for each analysis stage.
fluviewer.database
This module includes functions used to check the integrity of the FluViewer database prior to analysis.
fluviewer.parsers
This module includes functions related to parsing output files.
- fluviewer.parsers.parse_bbnorm_log(bbnorm_log_path: Path) dict
Parse the log file generated by BBnorm.
- Parameters
bbnorm_log_path (str) – The path to the log file generated by BBnorm.
- Returns
A dictionary with the parsed log file.
- Return type
dict
- fluviewer.parsers.parse_contig_alignment(alignment_path: Path) list[dict]
Parse the alignment file and return a list of dictionaries representing the alignment of contigs to the scaffold.
- Parameters
alignment_path (Path) – The path to the alignment file.
- Returns
A list of dictionaries representing the alignment of contigs to the scaffold. Keys are ‘id’, ‘seq’, ‘matches’.
- Return type
list[dict]
- fluviewer.parsers.parse_scaffolds(scaffolds_path: Path, segment_to_parse: str) dict
Parse the scaffolds file and return a dictionary of scaffold_id -> scaffold_sequence.
- Parameters
scaffolds_path (Path) – The path to the scaffolds file.
segment (str) – The segment to parse (e.g. ‘HA’).
- Returns
A dictionary with the parsed scaffold sequence. Keys are ‘id’, ‘segment’, ‘seq’ and ‘matches’.
- Return type
dict
fluviewer.report
This module includes functions related to building the final summary report.
fluviewer.plots
This module includes functions related to generating plots to visualize FluViewer outputs.
fluviewer.cli_args
This module includes functions related to parsing and validating command-line arguments.
- fluviewer.cli_args.parse_args()
Parse command line arguments using argparse.
- Returns
Dictionary of arguments and their values.
- Return type
dict
- fluviewer.cli_args.validate_args(args)
Validate the arguments provided by the user.
- Parameters
args (argparse.Namespace) – Dictionary of arguments and their values.
fluviewer.logging_config
This module includes functions related to logging configuration.
- fluviewer.logging_config.configure_logging(log_level, log_file)
Configure logging to log to stderr and args.outdir/logs/fluviewer.log. Should configure in such a way that all other modules can call logging.getLogger(__name__) and have the same log settings.