auto_process_ngs.commands.report_cmd

auto_process_ngs.commands.report_cmd.default_value(s, default='')

Returns supplied value, or default if supplied value is None

auto_process_ngs.commands.report_cmd.fetch_value(ap, project, field)

Return the value of the supplied field

Given a field name, return the value determined from the data in the supplied AutoProcessor and AnalysisProject instances.

Parameters:
  • ap (AutoProcessor) – autoprocessor pointing to the analysis directory to be reported on

  • project (AnalysisProject) – project to report on

  • field (str) – field name to return value of

Returns:

value of supplied field.

Return type:

String

auto_process_ngs.commands.report_cmd.report(ap, mode=None, fields=None, out_file=None)

Print a report on an analysis project

Parameters:
  • ap (AutoProcessor) – autoprocessor pointing to the analysis directory to be reported on

  • mode (int) – reporting mode (concise, summary, projects or info)

  • fields (list) – optional set of fields to report (only for ‘projects’ reporting mode)

  • out_file (str) – optional, path to a file to write the report to (default is to write to stdout)

auto_process_ngs.commands.report_cmd.report_concise(ap)

Generate one-line report suitable for logging

Generates a one-line report that can be used for logging, for example:

Paired end: ‘PJB’: Peter Briggs, Mouse ChIP-seq (PI: P Briggs) (6 samples); …

The report is based on project directories that are located in the analysis directory, and not from other information (e.g. contents of the ‘bcl2fastq’ directory or other outputs from processing).

Parameters:

ap (AutoProcessor) – autoprocessor pointing to the analysis directory to be reported on

Returns:

String with the report text.

auto_process_ngs.commands.report_cmd.report_info(ap)

Generate a general report

Generates an unstructured report on the contents of the analysis directory.

Parameters:

ap (AutoProcessor) – autoprocessor pointing to the analysis directory to be reported on

Returns:

String with the report text.

auto_process_ngs.commands.report_cmd.report_projects(ap, fields=None)

Generate one line reports suitable for pasting into spreadsheet

Generate one-line report for each each project with tab-separated data items, suitable for injection into a spreadsheet.

By default each line has the following information:

  • Run id e.g. HISEQ_140328

  • Run number

  • Source

  • Empty field (for user supplied date)

  • User

  • PI

  • Application

  • Single Cell Platform

  • Organism

  • Platform

  • #Samples

  • #Cells

  • PE (yes/no)

  • Samples

Alternatively a custom list of fields can be specified via the ‘fields’ argument.

Composite fields can be specified by joining two or more fields with ‘+’ (e.g. ‘project+run_id’); the resulting value will be the values of the individual fields separated by spaces (with null values simply ignored).

An alternative delimiter can be explicitly specified by prefacing the composite field with a pair of square braces enclosing the new delimiter, followed by a colon (e.g. ‘[_]:user+PI’ will use an underscore instead of a space).

Parameters:
  • ap (AutoProcessor) – autoprocessor pointing to the analysis directory to be reported on

  • fields (list) – list or tuple of field names to output for each project

Returns:

String with the report text.

auto_process_ngs.commands.report_cmd.report_summary(ap)

Generate summary report suitable for bioinformaticians

Generates a multi-line report which gives general information about the run, plus one-line summaries for each project, plus any additional information that has been recorded.

The general information includes:

  • Platform

  • Run name

  • Run ID

  • Run reference

  • Sequencer model

  • Processing software

For each project:

  • Project subdirectory

  • Researcher (aka user)

  • PI

  • Application (aka library type)

  • Single cell prep platform (e.g. ICell8)

  • Organism

  • Number of samples

Parameters:

ap (AutoProcessor) – autoprocessor pointing to the analysis directory to be reported on

Returns:

String with the report text.