|
3 | 3 | # auto_processor.py: automated processing of Illumina sequence data |
4 | 4 | # Copyright (C) University of Manchester 2013-2026 Peter Briggs |
5 | 5 | # |
6 | | -######################################################################### |
7 | | -# |
8 | | -# auto_processor.py |
9 | | -# |
10 | | -######################################################################### |
11 | 6 |
|
12 | 7 | ####################################################################### |
13 | 8 | # Imports |
|
24 | 19 | import gzip |
25 | 20 | import atexit |
26 | 21 | import bcftbx.IlluminaData as IlluminaData |
27 | | -import bcftbx.TabFile as TabFile |
28 | 22 | import bcftbx.utils as bcf_utils |
29 | | -import bcftbx.htmlpagewriter as htmlpagewriter |
30 | | -from bcftbx.JobRunner import fetch_runner |
31 | | -from bcftbx.FASTQFile import FastqIterator |
32 | | -from . import commands |
33 | 23 | from .analysis import AnalysisProject |
34 | 24 | from .analysis import run_id |
35 | 25 | from .analysis import run_reference_id |
36 | | -from .decorators import add_command |
37 | 26 | from .metadata import AnalysisDirParameters |
38 | 27 | from .metadata import AnalysisDirMetadata |
39 | 28 | from .metadata import ProjectMetadataFile |
40 | 29 | from .utils import edit_file |
41 | 30 | from .utils import get_numbered_subdir |
42 | 31 | from .utils import sort_sample_names |
43 | 32 | from .bcl2fastq.utils import get_sequencer_platform |
44 | | -from .samplesheet_utils import check_and_warn |
45 | 33 | from .settings import Settings |
46 | 34 | from .exceptions import MissingParameterFileException |
47 | 35 | from functools import reduce |
48 | | -from . import get_version |
49 | 36 |
|
50 | 37 | ####################################################################### |
51 | 38 | # Classes |
52 | 39 | ####################################################################### |
53 | 40 |
|
54 | | -@add_command("setup",commands.setup) |
55 | | -@add_command("make_fastqs",commands.make_fastqs) |
56 | | -@add_command("analyse_barcodes",commands.analyse_barcodes) |
57 | | -@add_command("merge_fastq_dirs",commands.merge_fastq_dirs) |
58 | | -@add_command("setup_analysis_dirs",commands.setup_analysis_dirs) |
59 | | -@add_command("run_qc",commands.run_qc) |
60 | | -@add_command("publish_qc",commands.publish_qc) |
61 | | -@add_command("archive",commands.archive) |
62 | | -@add_command("update",commands.update) |
63 | | -@add_command("report",commands.report) |
64 | | -@add_command("update_fastq_stats",commands.update_fastq_stats) |
65 | | -@add_command("import_project",commands.import_project) |
66 | | -@add_command("clone",commands.clone) |
67 | | -@add_command("samplesheet",commands.samplesheet) |
| 41 | + |
68 | 42 | class AutoProcess: |
69 | 43 | """ |
70 | 44 | Class implementing an automatic fastq generation and QC |
71 | 45 | processing procedure for Illumina sequencing data |
72 | 46 |
|
| 47 | + The 'AutoProcess' class provides an interface to a directory |
| 48 | + being used for processing Illumina sequencing data, including |
| 49 | + Fastq generation and QC operations. |
| 50 | +
|
| 51 | + The auto_process data processing and QC pipelines are |
| 52 | + constructed around this class, which allows the current state |
| 53 | + of the processing directory (and associated metadata) to be |
| 54 | + accessed and modified. |
| 55 | +
|
| 56 | + Arguments: |
| 57 | + analysis_dir (str): name/path for existing analysis |
| 58 | + directory |
| 59 | + settings (Settings): optional, if supplied then should |
| 60 | + be a Settings instance; otherwise use a default |
| 61 | + instance populated from the installation-specific |
| 62 | + 'auto_process.ini' file |
| 63 | + allow_save_params (bool): if True then allow updates |
| 64 | + to parameters to be saved back to the parameter file |
| 65 | + (this is the default) |
73 | 66 | """ |
74 | 67 | def __init__(self,analysis_dir=None,settings=None, |
75 | 68 | allow_save_params=True): |
76 | | - """ |
77 | | - Create a new AutoProcess instance |
78 | | -
|
79 | | - Arguments: |
80 | | - analysis_dir (str): name/path for existing analysis |
81 | | - directory |
82 | | - settings (Settings): optional, if supplied then should |
83 | | - be a Settings instance; otherwise use a default |
84 | | - instance populated from the installation-specific |
85 | | - 'auto_process.ini' file |
86 | | - allow_save_params (bool): if True then allow updates |
87 | | - to parameters to be saved back to the parameter file |
88 | | - (this is the default) |
89 | | -
|
90 | | - """ |
91 | 69 | # Initialise |
92 | 70 | self._master_log_dir = "logs" |
93 | 71 | self._log_dir = self._master_log_dir |
|
0 commit comments