def METHOD_NAME(self, inputs, outputs):
    """Run the analysis."""
    lib_strand = ""
    if inputs.options.stranded == "auto":
        detect_strandedness_inputs = [
            inputs.alignment.output.bam.path,
            inputs.options.n_reads,
            inputs.options.cdna_index.output.index.path,
            self.requirements.resources.cores,
        ]
        Cmd["detect_strandedness.sh"](detect_strandedness_inputs)
        try:
            lib_strand = STRAND_CODES[
                json.load(open("results/lib_format_counts.json")).get(
                    "expected_format", ""
                )
            ]
        except KeyError:
            self.error(
                "Library strandedness autodetection failed. Use manual selection options instead."
            )
    # Default and required arguments
    args = [
        "--skipFunctions",
        "writeDESeq,writeDEXSeq",
        "--randomSeed",
        42,
        "--generatePlots",
        inputs.alignment.output.bam.path,
        inputs.annotation.output.annot.path,
        "qorts_output",
    ]
    optional_args = []
    # Detect if aligned reads in BAM file are of single or paired-end type
    # The samtools view command counts the number of reads with the SAM flag "read paired (0x1)"
    if (
        Cmd["samtools"](
            "view", "-c", "-f", "1", inputs.alignment.output.bam.path
        ).strip()
        == "0"
    ):
        optional_args.append("--singleEnded")
    if inputs.options.stranded == "forward" or lib_strand == "forward":
        optional_args.extend(["--stranded", "--stranded_fr_secondstrand"])
    elif inputs.options.stranded == "reverse" or lib_strand == "reverse":
        optional_args.append("--stranded")
    if inputs.options.maxPhredScore or inputs.options.maxPhredScore == 0:
        optional_args.extend(["--maxPhredScore", inputs.options.maxPhredScore])
    if inputs.options.adjustPhredScore or inputs.options.adjustPhredScore == 0:
        optional_args.extend(
            ["--adjustPhredScore", inputs.options.adjustPhredScore]
        )
    memory_limit = "-Xmx{}g".format(self.requirements.resources.memory // 1024)
    # join optional and required arguments
    Cmd["QoRTs"]([memory_limit, "QC"] + optional_args + args)
    # Compress QoRTs output folder
    Cmd["zip"](["-r", "qorts_report.zip", "qorts_output"])
    outputs.plot = "qorts_output/QC.multiPlot.pdf"
    outputs.summary = "qorts_output/QC.summary.txt"
    outputs.qorts_data = "qorts_report.zip"