seismicrna package

Subpackages

Submodules

seismicrna.interface.dataset_from_report(report_path: str | Path, verify_times: bool = True) MutsDataset

Load a dataset from a report file.

Parameters:
  • report_path (str | Path) – The path to a report json file from the idmut, filter, or cluster steps.

  • verify_times (bool = True) – Ensure that the report file does not have a timestamp that is earlier than that of one of its constituents.

Returns:

The type of MutsDataset returned depends on the report file.

Return type:

IDmutMutsDataset | FilterMutsDataset | ClusterMutsDataset

seismicrna.interface.table_from_dataset(dataset: MutsDataset, table: str = 'pos') TableWriter

Tabulate a dataset to generate a TableWriter

Parameters:
  • dataset (IDmutMutsDataset | FilterMutsDataset | ClusterMutsDataset) – A dataset from the IDmut, Filter, or Cluster steps.

  • table (str = "pos") – The type of table to generate. Valid options include “pos” for per-position table, “read” for per-read table, and “abundance” for a cluster abundance table.

Returns:

The type of TableWriter returned depends on the Dataset type.

Return type:

TableWriter

seismicrna.interface.table_from_report(report_path: str | Path, verify_times: bool = True, table: str = 'pos')

Load a dataset from a report file and tabulate it.

Parameters:
  • report_path (str | Path) – Path to a report JSON file from the IDmut, Filter, or Cluster step.

  • verify_times (bool) – If True, ensure the report file does not have a timestamp earlier than any of its constituent files.

  • table (str) – Type of table to generate: “pos” for per-position, “read” for per-read, or “abundance” for cluster abundance.

Returns:

The type of TableWriter returned depends on the report file.

Return type:

TableWriter

seismicrna.join.join_regions(out_dir: Path, joined_region: str, sample: str, branches_flat: Iterable[str], ref: str, regs: Iterable[str], clustered: bool, *, clusts: dict[str, dict[int, dict[int, int]]], filter_pos_table: bool, filter_read_table: bool, cluster_pos_table: bool, cluster_abundance_table: bool, verify_times: bool, num_cpus: int, force: bool, tmp_pfx, keep_tmp)

Join one or more regions (horizontally).

Parameters:
  • out_dir (pathlib.Path) – Output directory.

  • joined_region (str) – Name of the joined region.

  • branches_flat (Iterable[str]) – Branches of the datasets being pooled.

  • sample (str) – Name of the sample.

  • ref (str) – Name of the reference.

  • regs (Iterable[str]) – Names of the regions being joined.

  • clustered (bool) – Whether the dataset is clustered.

  • tmp_dir (Path) – Temporary directory.

  • clusts (dict[str, dict[int, dict[int, int]]]) – For each region, for each number of clusters, the cluster from the original region to use as the cluster in the joined region (ignored if clustered is False).

  • filter_pos_table (bool) – Tabulate relationships per position for filtered data.

  • filter_read_table (bool) – Tabulate relationships per read for filtered data.

  • cluster_pos_table (bool) – Tabulate relationships per position for clustered data.

  • cluster_abundance_table (bool) – Tabulate number of reads per cluster for clustered data.

  • verify_times (bool) – Verify that report files from later steps have later timestamps.

  • num_cpus (bool) – Number of processors to use.

  • force (bool) – Force the report to be written, even if it exists.

Returns:

Path of the Join report file.

Return type:

pathlib.Path

seismicrna.join.joined_filter_report_exists(top: Path, sample: str, branches_flat: Iterable[str], ref: str, joined_region: str, regs: Iterable[str])

Return whether a filter report for the joined region exists.

seismicrna.join.parse_join_clusts_file(file: str | Path)

Parse a file of joined clusters.

seismicrna.join.run(joined_region: str = Sentinel.UNSET, input_path: Iterable[str | Path] = Sentinel.UNSET, *, join_clusts: str | None = None, filter_pos_table: bool = True, filter_read_table: bool = True, cluster_pos_table: bool = True, cluster_abundance_table: bool = True, verify_times: bool = True, tmp_pfx: str | Path = './tmp', keep_tmp: bool = False, num_cpus: int = 4, force: bool = False) list[Path]

Merge regions (horizontally) from the Filter or Cluster step.

Parameters:
  • join_clusts (str | None) – Specify which clusters to join clusters using this CSV file [keyword-only, default: None]

  • filter_pos_table (bool) – Tabulate relationships per position for filter data [keyword-only, default: True]

  • filter_read_table (bool) – Tabulate relationships per read for filter data [keyword-only, default: True]

  • cluster_pos_table (bool) – Tabulate relationships per position for cluster data [keyword-only, default: True]

  • cluster_abundance_table (bool) – Tabulate number of reads per cluster for cluster data [keyword-only, default: True]

  • verify_times (bool) – Verify that report files from later steps have later timestamps [keyword-only, default: True]

  • tmp_pfx (str | Path) – Write all temporary files to a directory with this prefix [keyword-only, default: ‘./tmp’]

  • keep_tmp (bool) – Keep temporary files after finishing [keyword-only, default: False]

  • num_cpus (int) – Use up to this many CPUs simultaneously [keyword-only, default: 4]

  • force (bool) – Force all tasks to run, overwriting any existing output files [keyword-only, default: False]

seismicrna.join.write_report(report_type: type[JoinReport], out_dir: Path, **kwargs)

Instantiate and save a JoinReport.

Parameters:
  • report_type (type[JoinReport]) – The concrete JoinReport subclass to instantiate.

  • out_dir (Path) – Directory in which to save the report file.

seismicrna.lists.find_pos(table: PositionTable, max_fmut_pos: float, complement: bool)

Find positions that pass a mutation-rate filter.

Parameters:
  • table (PositionTable) – Per-position table from which mutation rates are fetched.

  • max_fmut_pos (float) – Maximum allowed mutation frequency; positions above this threshold are masked (or kept if complement is True).

  • complement (bool) – If True, invert the filter so that positions above the threshold are kept instead of masked.

seismicrna.lists.iter_tables(input_path: Iterable[str | Path], **kwargs)

Iterate through all types of List and all Tables from which each type of List can be created.

seismicrna.lists.run(input_path: Iterable[str | Path] = Sentinel.UNSET, *, branch: str = '', min_ninfo_pos: int = 1000, max_fmut_pos: float = 1.0, force: bool = False, num_cpus: int = 4) list[Path]

List positions to mask.

Parameters:
  • branch (str) – Create a new branch of the workflow with this name [keyword-only, default: ‘’]

  • min_ninfo_pos (int) – Mask positions with fewer than this many informative base calls [keyword-only, default: 1000]

  • max_fmut_pos (float) – Mask positions with more than this fraction of mutated base calls [keyword-only, default: 1.0]

  • force (bool) – Force all tasks to run, overwriting any existing output files [keyword-only, default: False]

  • num_cpus (int) – Use up to this many CPUs simultaneously [keyword-only, default: 4]

seismicrna.lists.write_list(table: PositionTableLoader, list_type: type[List], *, branch: str, min_ninfo_pos: int, max_fmut_pos: float, force: bool)

Write a List based on a Table.

Draw the SEISMIC-RNA logo as an SVG.

Parameters:
  • report (bool) – If True, render the variant of the logo used in reports (different background triangle color).

  • out_svg (str | Path | None) – Path to write the SVG file; if None the SVG is returned as a string instead of being written to disk.

  • dpi (int) – Resolution in dots per inch used when saving the figure.

seismicrna.migrate.migrate_out_dir(out_dir: Path, num_cpus: int)
seismicrna.migrate.migrate_sample_dir(sample_dir: Path, num_cpus: int)
seismicrna.migrate.run(input_path: Iterable[str | Path] = Sentinel.UNSET, *, out_dir: str | Path = './out', num_cpus: int = 4)

Migrate output directories from v0.24 to v0.25

Parameters:
  • out_dir (str | pathlib._local.Path) – Write all output files to this directory [keyword-only, default: ‘./out’]

  • num_cpus (int) – Use up to this many CPUs simultaneously [keyword-only, default: 4]

seismicrna.pool.pool_samples(out_dir: Path, pooled_sample: str, branches_flat: Iterable[str], ref: str, samples: Iterable[str], *, min_pearson: float, max_marcd: float, idmut_pos_table: bool, idmut_read_table: bool, verify_times: bool, num_cpus: int, force: bool, tmp_pfx, keep_tmp)

Pool one or more samples (vertically).

Parameters:
  • out_dir (pathlib.Path) – Output directory.

  • pooled_sample (str) – Name of the pooled sample.

  • branches_flat (Iterable[str]) – Branches of the datasets being pooled.

  • ref (str) – Name of the reference

  • samples (Iterable[str]) – Names of the samples in the pool.

  • tmp_dir (Path) – Temporary directory.

  • min_pearson (float) – Skip pooling if any pair of samples has Pearson r below this.

  • max_marcd (float) – Skip pooling if any pair of samples has MARCD above this.

  • idmut_pos_table (bool) – Tabulate relationships per position for IDmut data.

  • idmut_read_table (bool) – Tabulate relationships per read for IDmut data.

  • verify_times (bool) – Verify that report files from later steps have later timestamps.

  • num_cpus (bool) – Number of processors to use.

  • force (bool) – Force the report to be written, even if it exists.

Returns:

Path of the Pool report file.

Return type:

pathlib.Path

seismicrna.pool.run(pooled_sample: str = Sentinel.UNSET, input_path: Iterable[str | Path] = Sentinel.UNSET, *, idmut_pos_table: bool = True, idmut_read_table: bool = False, min_pearson: float = 0.0, max_marcd: float = 1.0, verify_times: bool = True, tmp_pfx: str | Path = './tmp', keep_tmp: bool = False, num_cpus: int = 4, force: bool = False) list[Path]

Merge samples (vertically) from the IDmut step.

Parameters:
  • idmut_pos_table (bool) – Tabulate relationships per position for idmut data [keyword-only, default: True]

  • idmut_read_table (bool) – Tabulate relationships per read for idmut data [keyword-only, default: False]

  • min_pearson (float) – Pool samples only if their Pearson correlation is at least this large [keyword-only, default: 0.0]

  • max_marcd (float) – Pool samples only if their mean arsince distance is at most this [keyword-only, default: 1.0]

  • verify_times (bool) – Verify that report files from later steps have later timestamps [keyword-only, default: True]

  • tmp_pfx (str | pathlib._local.Path) – Write all temporary files to a directory with this prefix [keyword-only, default: ‘./tmp’]

  • keep_tmp (bool) – Keep temporary files after finishing [keyword-only, default: False]

  • num_cpus (int) – Use up to this many CPUs simultaneously [keyword-only, default: 4]

  • force (bool) – Force all tasks to run, overwriting any existing output files [keyword-only, default: False]

seismicrna.pool.write_report(out_dir: Path, **kwargs)
seismicrna.table.get_dataset_flags(dataset: MutsDataset, idmut_pos_table: bool, idmut_read_table: bool, filter_pos_table: bool, filter_read_table: bool, cluster_pos_table: bool, cluster_abundance_table: bool)

Return the tabulator and table flags for a dataset.

seismicrna.table.get_tabulator_type(dataset_type: type[Dataset], count: Literal[False] = False) type[DatasetTabulator]
seismicrna.table.get_tabulator_type(dataset_type: type[Dataset], count: Literal[True]) type[CountTabulator]

Determine which class of Tabulator can process the dataset.

seismicrna.table.load_all_datasets(input_path: Iterable[str | Path], **kwargs)

Load datasets from all steps of the workflow.

seismicrna.table.run(input_path: Iterable[str | Path] = Sentinel.UNSET, *, idmut_pos_table: bool = True, idmut_read_table: bool = False, filter_pos_table: bool = True, filter_read_table: bool = True, cluster_pos_table: bool = True, cluster_abundance_table: bool = True, verify_times: bool = True, num_cpus: int = 4, force: bool = False) list[Path]

Tabulate counts of relationships per read and position.

Parameters:
  • idmut_pos_table (bool) – Tabulate relationships per position for idmut data [keyword-only, default: True]

  • idmut_read_table (bool) – Tabulate relationships per read for idmut data [keyword-only, default: False]

  • filter_pos_table (bool) – Tabulate relationships per position for filter data [keyword-only, default: True]

  • filter_read_table (bool) – Tabulate relationships per read for filter data [keyword-only, default: True]

  • cluster_pos_table (bool) – Tabulate relationships per position for cluster data [keyword-only, default: True]

  • cluster_abundance_table (bool) – Tabulate number of reads per cluster for cluster data [keyword-only, default: True]

  • verify_times (bool) – Verify that report files from later steps have later timestamps [keyword-only, default: True]

  • num_cpus (int) – Use up to this many CPUs simultaneously [keyword-only, default: 4]

  • force (bool) – Force all tasks to run, overwriting any existing output files [keyword-only, default: False]

seismicrna.table.tabulate(dataset: MutsDataset, tabulator_type: type[DatasetTabulator], pos_table: bool, read_table: bool, clust_table: bool, force: bool, num_cpus: int)

Write tables for a dataset using the appropriate tabulator.

Parameters:
  • dataset (MutsDataset) – Dataset to tabulate (from the idmut, filter, or cluster step).

  • tabulator_type (type[DatasetTabulator]) – Tabulator class that can process this dataset type.

  • pos_table (bool) – If True, write a per-position table.

  • read_table (bool) – If True, write a per-read table.

  • clust_table (bool) – If True, write a cluster abundance table.

  • force (bool) – If True, overwrite existing table files.

  • num_cpus (int) – Number of CPUs to use for computation.

seismicrna.urls.open_url(url: str)
seismicrna.wf.flatten(nested)
seismicrna.wf.run(fasta: str | Path = Sentinel.UNSET, input_path: Iterable[str | Path] = Sentinel.UNSET, *, out_dir: str | Path = './out', tmp_pfx: str | Path = './tmp', keep_tmp: bool = False, brotli_level: int = 10, force: bool = False, num_cpus: int = 4, wf_branch: Iterable[tuple[str, str]] = (), fastqz: Iterable[str | Path] = (), fastqy: Iterable[str | Path] = (), fastqx: Iterable[str | Path] = (), phred_enc: int = 33, demult: bool = False, barcode_start: int = 0, barcode_end: int = 0, read_pos: int = None, barcode: tuple[tuple[str, DNA, int]] = (), mismatch_tolerance: int = 0, index_tolerance: int = 0, allow_n: bool = False, dmfastqz: Iterable[str | Path] = (), dmfastqy: Iterable[str | Path] = (), dmfastqx: Iterable[str | Path] = (), fastp: bool = True, fastp_5: bool = False, fastp_3: bool = True, fastp_w: int = 6, fastp_m: int = 25, fastp_poly_g: str = 'auto', fastp_poly_g_min_len: int = 10, fastp_poly_x: bool = False, fastp_poly_x_min_len: int = 10, fastp_adapter_trimming: bool = True, fastp_adapter_1: str = '', fastp_adapter_2: str = '', fastp_adapter_fasta: str | None = None, fastp_detect_adapter_for_pe: bool = True, fastp_min_length: int = 9, bt2_local: bool = True, bt2_discordant: bool = False, bt2_mixed: bool = False, bt2_dovetail: bool = False, bt2_contain: bool = True, bt2_score_min_e2e: str = 'L,-1,-0.8', bt2_score_min_loc: str = 'L,1,0.8', bt2_i: int = 0, bt2_x: int = 600, bt2_gbar: int = 4, bt2_l: int = 20, bt2_s: str = 'L,1,0.1', bt2_d: int = 4, bt2_r: int = 2, bt2_dpad: int = 2, bt2_orient: str = 'fr', bt2_un: bool = True, min_mapq: int = 25, sep_strands: bool = False, f1r2_fwd: bool = False, rev_label: str = '-rev', min_phred: int = 25, min_reads: int = 1000, insert3: bool = True, ambindel: bool = True, overhangs: bool = True, clip_end5: int = 4, clip_end3: int = 4, batch_size: int = 65536, write_read_names: bool = False, idmut_pos_table: bool = True, idmut_read_table: bool = False, idmut_cx: bool = True, region_coords: Iterable[tuple[str, int, int]] = (), region_primers: Iterable[tuple[str, DNA, DNA]] = (), primer_gap: int = 0, regions_file: str | None = None, count_del: bool = True, count_ins: bool = True, no_mut: Iterable[str] = (), only_mut: Iterable[str] = (), probe: str = 'DMS', mask_a: bool | None = None, mask_c: bool | None = None, mask_g: bool | None = None, mask_u: bool | None = None, mask_polya: int | None = None, mask_pos: Iterable[tuple[str, int]] = (), mask_pos_file: Iterable[str | Path] = (), drop_read: Iterable[str] = (), drop_read_file: Iterable[str | Path] = (), drop_discontig: bool = True, min_ncov_read: int = 1, min_fcov_read: float = 0.0, min_finfo_read: float = 0.95, max_fmut_read: float = 1.0, min_mut_gap: int = None, mut_collisions: str = 'auto', min_ninfo_pos: int = 1000, max_fmut_pos: float = 1.0, quick_unbias: bool = True, quick_unbias_thresh: float = 0.001, max_filter_iter: int = 0, filter_pos_table: bool = True, filter_read_table: bool = True, scan: bool = False, tile_length: int = 0, tile_min_overlap: float = 0.5, erase_tiles: bool = True, pair_fdr: float = 0.05, min_pairs: int = 2, pair_distance_percentile: float = 95.0, endpoint_window: int = 2, min_nearby_pairs: int = 2, min_cluster_length: int = 20, max_cluster_length: int = 1200, gap_mode: str = 'omit', cluster: bool = False, min_clusters: int = 1, max_clusters: int = 0, min_em_runs: int = 6, max_em_runs: int = 30, jackpot: bool = True, jackpot_conf_level: float = 0.95, max_jackpot_quotient: float = 1.1, max_jackpot_sims: int = 12, jackpot_max_data: int = 268435456, min_em_iter: int = 10, max_em_iter: int = 500, em_thresh: float = 0.37, min_marcd_run: float = 0.016, max_pearson_run: float = 0.9, max_arcd_vs_ens_avg: float = 0.2, max_gini_run: float = 0.667, max_loglike_vs_best: float = 0.0, min_pearson_vs_best: float = 0.97, max_marcd_vs_best: float = 0.008, try_all_ks: bool = False, write_all_ks: bool = False, cluster_pos_table: bool = True, cluster_abundance_table: bool = True, verify_times: bool = True, self_contained: bool = False, fold: bool = False, fold_coords: Iterable[tuple[str, int, int]] = (), fold_primers: Iterable[tuple[str, DNA, DNA]] = (), fold_regions_file: str | None = None, fold_table_region: bool = False, fold_dry_run: bool = False, fold_backend: str = 'auto', pseudoknots: bool = False, fold_temp: float = 37.0, fold_energy_method: str = 'auto', deigan_slope: float = 1.8, deigan_intercept: float = -0.6, fold_quantile: float = 0.95, fold_constraint: str | None = None, fold_commands: str | None = None, eddy_prior_paired_file: str | None = None, eddy_prior_unpaired_file: str | None = None, fold_md: int = 0, fold_mfe: bool = False, fold_max: int = 20, fold_percent: float = 20.0, fold_edelta: float = 1.0, fold_isolated: bool = False, draw: bool = False, struct_num: Iterable[int] = (), color: bool = True, draw_svg: bool = True, draw_png: bool = False, update_rnartistcore: bool = False, export: bool = False, samples_meta: str = None, refs_meta: str = None, all_pos: bool = True, cgroup: str = 'k', graph_quantile: float = 0.0, hist_bins: int = 10, hist_margin: float = 0.1, struct_file: Iterable[str | Path] = (), terminal_pairs: bool = True, window: int = 45, winmin: int = 9, csv: bool = True, html: bool = True, svg: bool = False, pdf: bool = False, png: bool = False, graph_mprof: bool = True, graph_tmprof: bool = True, graph_ncov: bool = True, graph_mhist: bool = True, graph_abundance: bool = True, graph_giniroll: bool = False, graph_roc: bool = True, graph_aucroll: bool = False, graph_poscorr: bool = False, graph_mutdist: bool = False, mutdist_null: bool = True, collate: bool = True, name: str = 'collated', verbose_name: bool = False, include_svg: bool = True, include_graph: bool = True, group: str = 'sample', portable: bool = False, collate_out_dir: str | Path | None = None, seed: int | None = None)

Run the entire workflow.

Parameters:
  • out_dir (str | pathlib._local.Path) – Write all output files to this directory [keyword-only, default: ‘./out’]

  • tmp_pfx (str | pathlib._local.Path) – Write all temporary files to a directory with this prefix [keyword-only, default: ‘./tmp’]

  • keep_tmp (bool) – Keep temporary files after finishing [keyword-only, default: False]

  • brotli_level (int) – Compress pickle files with this level of Brotli (0 - 11) [keyword-only, default: 10]

  • force (bool) – Force all tasks to run, overwriting any existing output files [keyword-only, default: False]

  • num_cpus (int) – Use up to this many CPUs simultaneously [keyword-only, default: 4]

  • wf_branch (Iterable) – Run a step under a new branch: give the step name then the branch name (may be used multiple times to branch different steps) [keyword-only, default: ()]

  • fastqz (Iterable) – FASTQ file(s) of single-end reads [keyword-only, default: ()]

  • fastqy (Iterable) – FASTQ file(s) of paired-end reads with mates 1 and 2 interleaved [keyword-only, default: ()]

  • fastqx (Iterable) – FASTQ files of paired-end reads with mates 1 and 2 in separate files [keyword-only, default: ()]

  • phred_enc (int) – Specify the Phred score encoding of FASTQ and SAM/BAM/CRAM files [keyword-only, default: 33]

  • demult (bool) – Enable demultiplexing [keyword-only, default: False]

  • barcode_start (int) – Index of start of barcode [keyword-only, default: 0]

  • barcode_end (int) – Index of end of barcode [keyword-only, default: 0]

  • read_pos (int) – Expected position of the barcode in the read (1-indexed). Defaults to –barcode-start [keyword-only, default: None]

  • barcode (tuple) – A list of barcode name, barcode sequence, and barcode position (1-indexed relative to read start) to demultiplex [keyword-only, default: ()]

  • mismatch_tolerance (int) – Consider patterns to match if they have up to this many mismatches. Will increase non-parallel computation at a factorial rate. Use caution Going above 2 mismatches. Does not apply to clipped sequences. [keyword-only, default: 0]

  • index_tolerance (int) – Allow patterns to be found in reads up to this distance from the reference index. [keyword-only, default: 0]

  • allow_n (bool) – Allow N as a valid mismatch when –mismatch-tolerance ≥ 1. Increases memory consumption. [keyword-only, default: False]

  • dmfastqz (Iterable) – Demultiplexed FASTQ files of single-end reads [keyword-only, default: ()]

  • dmfastqy (Iterable) – Demultiplexed FASTQ files of paired-end reads interleaved in one file [keyword-only, default: ()]

  • dmfastqx (Iterable) – Demultiplexed FASTQ files of mate 1 and mate 2 reads [keyword-only, default: ()]

  • fastp (bool) – Use fastp to QC, filter, and trim reads before alignment [keyword-only, default: True]

  • fastp_5 (bool) – Trim low-quality bases from the 5’ ends of reads [keyword-only, default: False]

  • fastp_3 (bool) – Trim low-quality bases from the 3’ ends of reads [keyword-only, default: True]

  • fastp_w (int) – Use this window size (nt) for –fastp-5 and –fastp-3 [keyword-only, default: 6]

  • fastp_m (int) – Use this mean quality threshold for –fastp-5 and –fastp-3 [keyword-only, default: 25]

  • fastp_poly_g (str) – Trim poly(G) tails (two-color sequencing artifacts) from the 3’ end [keyword-only, default: ‘auto’]

  • fastp_poly_g_min_len (int) – Minimum number of Gs to consider a poly(G) tail for –fastp-poly-g [keyword-only, default: 10]

  • fastp_poly_x (bool) – Trim poly(X) tails (i.e. of any nucleotide) from the 3’ end [keyword-only, default: False]

  • fastp_poly_x_min_len (int) – Minimum number of bases to consider a poly(X) tail for –fastp-poly-x [keyword-only, default: 10]

  • fastp_adapter_trimming (bool) – Trim adapter sequences from the 3’ ends of reads [keyword-only, default: True]

  • fastp_adapter_1 (str) – Trim this adapter sequence from the 3’ ends of read 1s [keyword-only, default: ‘’]

  • fastp_adapter_2 (str) – Trim this adapter sequence from the 3’ ends of read 2s [keyword-only, default: ‘’]

  • fastp_adapter_fasta (str | None) – Trim adapter sequences in this FASTA file from the 3’ ends of reads [keyword-only, default: None]

  • fastp_detect_adapter_for_pe (bool) – Automatically detect the adapter sequences for paired-end reads [keyword-only, default: True]

  • fastp_min_length (int) – Discard reads shorter than this length [keyword-only, default: 9]

  • bt2_local (bool) – Align reads in local mode rather than end-to-end mode [keyword-only, default: True]

  • bt2_discordant (bool) – Output paired-end reads whose mates align discordantly [keyword-only, default: False]

  • bt2_mixed (bool) – Attempt to align individual mates of pairs that fail to align [keyword-only, default: False]

  • bt2_dovetail (bool) – Consider dovetailed mate pairs to align concordantly [keyword-only, default: False]

  • bt2_contain (bool) – Consider nested mate pairs to align concordantly [keyword-only, default: True]

  • bt2_score_min_e2e (str) – Discard alignments that score below this threshold in end-to-end mode [keyword-only, default: ‘L,-1,-0.8’]

  • bt2_score_min_loc (str) – Discard alignments that score below this threshold in local mode [keyword-only, default: ‘L,1,0.8’]

  • bt2_i (int) – Discard paired-end alignments shorter than this many bases [keyword-only, default: 0]

  • bt2_x (int) – Discard paired-end alignments longer than this many bases [keyword-only, default: 600]

  • bt2_gbar (int) – Do not place gaps within this many bases from the end of a read [keyword-only, default: 4]

  • bt2_l (int) – Use this seed length for Bowtie2 [keyword-only, default: 20]

  • bt2_s (str) – Seed Bowtie2 alignments at this interval [keyword-only, default: ‘L,1,0.1’]

  • bt2_d (int) – Discard alignments if over this many consecutive seed extensions fail [keyword-only, default: 4]

  • bt2_r (int) – Re-seed reads with repetitive seeds up to this many times [keyword-only, default: 2]

  • bt2_dpad (int) – Pad the alignment matrix with this many bases (to allow gaps) [keyword-only, default: 2]

  • bt2_orient (str) – Require paired mates to have this orientation [keyword-only, default: ‘fr’]

  • bt2_un (bool) – Output unaligned reads to a FASTQ file [keyword-only, default: True]

  • min_mapq (int) – Discard reads with mapping qualities below this threshold [keyword-only, default: 25]

  • sep_strands (bool) – Separate each alignment map into forward- and reverse-strand reads [keyword-only, default: False]

  • f1r2_fwd (bool) – With –sep-strands, consider forward mate 1s and reverse mate 2s to be forward-stranded [keyword-only, default: False]

  • rev_label (str) – With –sep-strands, add this label to each reverse-strand reference [keyword-only, default: ‘-rev’]

  • min_phred (int) – Mark base calls with Phred scores lower than this threshold as ambiguous [keyword-only, default: 25]

  • min_reads (int) – Discard alignment maps with fewer than this many reads [keyword-only, default: 1000]

  • insert3 (bool) – Mark each insertion on the base to its 3’ (True) or 5’ (False) side [keyword-only, default: True]

  • ambindel (bool) – Mark all ambiguous insertions and deletions (indels) [keyword-only, default: True]

  • overhangs (bool) – Retain the overhangs of paired-end mates that dovetail [keyword-only, default: True]

  • clip_end5 (int) – Clip this many bases from the 5’ end of each read [keyword-only, default: 4]

  • clip_end3 (int) – Clip this many bases from the 3’ end of each read [keyword-only, default: 4]

  • batch_size (int) – Limit batches to at most this many reads [keyword-only, default: 65536]

  • write_read_names (bool) – Write the name of each read in a second set of batches (necessary for the options –drop-read or –drop-read-file) [keyword-only, default: False]

  • idmut_pos_table (bool) – Tabulate relationships per position for idmut data [keyword-only, default: True]

  • idmut_read_table (bool) – Tabulate relationships per read for idmut data [keyword-only, default: False]

  • idmut_cx (bool) – Use a fast (C extension module) version of the idmut algorithm; the slow (Python) version is still avilable as a fallback if the C extension cannot be loaded, and for debugging/benchmarking [keyword-only, default: True]

  • region_coords (Iterable) – Select a region of a reference given its 5’ and 3’ end coordinates [keyword-only, default: ()]

  • region_primers (Iterable) – Select a region of a reference given its forward and reverse primers [keyword-only, default: ()]

  • primer_gap (int) – Leave a gap of this many bases between the primer and the region [keyword-only, default: 0]

  • regions_file (str | None) – Select regions of references from coordinates/primers in a CSV file [keyword-only, default: None]

  • count_del (bool) – Count deletions as mutations [keyword-only, default: True]

  • count_ins (bool) – Count insertions as mutations [keyword-only, default: True]

  • no_mut (Iterable) – Do not count this type of mutation (overrides –count-del/ins) [keyword-only, default: ()]

  • only_mut (Iterable) – Count only this type of mutation (overrides other mutation settings) [keyword-only, default: ()]

  • probe (str) – Use the default options for this chemical probe [keyword-only, default: ‘DMS’]

  • mask_a (bool | None) – Mask positions with base A [keyword-only, default: None]

  • mask_c (bool | None) – Mask positions with base C [keyword-only, default: None]

  • mask_g (bool | None) – Mask positions with base G [keyword-only, default: None]

  • mask_u (bool | None) – Mask positions with base U [keyword-only, default: None]

  • mask_polya (int | None) – Mask stretches of at least this many consecutive A bases (0 disables); defaults to 5 for chemical probes, 0 for none [keyword-only, default: None]

  • mask_pos (Iterable) – Mask this position in this reference [keyword-only, default: ()]

  • mask_pos_file (Iterable) – Mask positions in references from a file [keyword-only, default: ()]

  • drop_read (Iterable) – Drop the read with this name [keyword-only, default: ()]

  • drop_read_file (Iterable) – Drop the reads with names in this file [keyword-only, default: ()]

  • drop_discontig (bool) – Drop paired-end reads with discontiguous mates [keyword-only, default: True]

  • min_ncov_read (int) – Drop reads with fewer than this many bases covering the region [keyword-only, default: 1]

  • min_fcov_read (float) – Drop reads covering less than this fraction of the region [keyword-only, default: 0.0]

  • min_finfo_read (float) – Drop reads with less than this fraction of informative base calls [keyword-only, default: 0.95]

  • max_fmut_read (float) – Drop reads with more than this fraction of mutated base calls [keyword-only, default: 1.0]

  • min_mut_gap (int) – Filter out mutations separated by fewer than this many bases [keyword-only, default: None]

  • mut_collisions (str) – If two mutations are closer than –min-mut-gap positions, MERGE the mutations, DROP the read, or AUTO-select based on the probe. [keyword-only, default: ‘auto’]

  • min_ninfo_pos (int) – Mask positions with fewer than this many informative base calls [keyword-only, default: 1000]

  • max_fmut_pos (float) – Mask positions with more than this fraction of mutated base calls [keyword-only, default: 1.0]

  • quick_unbias (bool) – Correct observer bias using a quick (typically linear time) heuristic [keyword-only, default: True]

  • quick_unbias_thresh (float) – Treat mutated fractions under this threshold as 0 with –quick-unbias [keyword-only, default: 0.001]

  • max_filter_iter (int) – Stop the filter step after this many iterations (0 for no limit) [keyword-only, default: 0]

  • filter_pos_table (bool) – Tabulate relationships per position for filter data [keyword-only, default: True]

  • filter_read_table (bool) – Tabulate relationships per read for filter data [keyword-only, default: True]

  • scan (bool) – Scan the RNA for domains (filterscan) and cluster them (clusterscan) [keyword-only, default: False]

  • tile_length (int) – Make each tile this length (if 0, use 2x the median read length) [keyword-only, default: 0]

  • tile_min_overlap (float) – Make adjacent tiles overlap by at least this fraction of length [keyword-only, default: 0.5]

  • erase_tiles (bool) – Erase the filter reports/batches from the tiling step [keyword-only, default: True]

  • pair_fdr (float) – Find correlated pairs at this false discovery rate (FDR) [keyword-only, default: 0.05]

  • min_pairs (int) – Cluster only the regions with at least this many correlated pairs [keyword-only, default: 2]

  • pair_distance_percentile (float) – Among pairs that survive the endpoint-peak filter, drop any pair whose L1 (Manhattan) distance to its nearest surviving neighbor exceeds this percentile of all such distances. Pairs more isolated than this threshold are treated as noise. [keyword-only, default: 95.0]

  • endpoint_window (int) – When testing whether a position is a significant hub of correlated pair endpoints, aggregate counts over a window of this many adjacent positions: forward (pos5, pos5+1, …, pos5+window) for 5’ ends, backward (pos3-window, …, pos3) for 3’ ends. Larger values boost statistical power for helices whose endpoints are not always at exactly the same position. [keyword-only, default: 2]

  • min_nearby_pairs (int) – Minimum number of other surviving pairs that must lie within the pair-distance-percentile L1 threshold for a pair to be kept. Setting this above 1 filters out small coincidental clusters of noise pairs (‘buddy noise’) at the cost of potentially clipping domain edges. [keyword-only, default: 2]

  • min_cluster_length (int) – Cluster only the regions with at least this many positions [keyword-only, default: 20]

  • max_cluster_length (int) – Cluster only the regions with no more than this many positions [keyword-only, default: 1200]

  • gap_mode (str) – If there are gaps between regions to cluster, OMIT (do not cluster) the gaps, INSERT a new region into each gap, or EXPAND the existing regions to fill the gaps [keyword-only, default: ‘omit’]

  • cluster (bool) – Cluster reads to find alternative structures [keyword-only, default: False]

  • min_clusters (int) – Start at this many clusters [keyword-only, default: 1]

  • max_clusters (int) – Stop at this many clusters (0 for no limit) [keyword-only, default: 0]

  • min_em_runs (int) – Run EM (successfully) at least this number of times for each K [keyword-only, default: 6]

  • max_em_runs (int) – Run EM (successfully or not) at most this number of times for each K [keyword-only, default: 30]

  • jackpot (bool) – Calculate the jackpotting quotient to find over-represented reads [keyword-only, default: True]

  • jackpot_conf_level (float) – Confidence level for the jackpotting quotient confidence interval [keyword-only, default: 0.95]

  • max_jackpot_quotient (float) – Remove runs whose jackpotting quotient exceeds this limit [keyword-only, default: 1.1]

  • max_jackpot_sims (int) – Maximum number of simulations to compute the jackpotting quotient [keyword-only, default: 12]

  • jackpot_max_data (int) – Skip calculating the jackpotting quotient if the reads × positions exceeds this limit [keyword-only, default: 268435456]

  • min_em_iter (int) – Run EM for at least this many iterations [keyword-only, default: 10]

  • max_em_iter (int) – Run EM for at most this many iterations [keyword-only, default: 500]

  • em_thresh (float) – Stop EM when the log likelihood increases by less than this threshold [keyword-only, default: 0.37]

  • min_marcd_run (float) – Remove runs with two clusters that differ by less than this MARCD [keyword-only, default: 0.016]

  • max_pearson_run (float) – Remove runs with two clusters more similar than this correlation [keyword-only, default: 0.9]

  • max_arcd_vs_ens_avg (float) – Remove runs where a cluster differs by more than this ARCD from the ensemble average at any position [keyword-only, default: 0.2]

  • max_gini_run (float) – Remove runs where any cluster’s Gini coefficient exceeds this limit [keyword-only, default: 0.667]

  • max_loglike_vs_best (float) – Remove Ks with a log likelihood gap larger than this (0 for no limit) [keyword-only, default: 0.0]

  • min_pearson_vs_best (float) – Remove Ks where every run has less than this correlation vs. the best [keyword-only, default: 0.97]

  • max_marcd_vs_best (float) – Remove Ks where every run has more than this MARCD vs. the best [keyword-only, default: 0.008]

  • try_all_ks (bool) – Try all numbers of clusters (Ks), even after finding the best number [keyword-only, default: False]

  • write_all_ks (bool) – Write all numbers of clusters (Ks), rather than only the best number [keyword-only, default: False]

  • cluster_pos_table (bool) – Tabulate relationships per position for cluster data [keyword-only, default: True]

  • cluster_abundance_table (bool) – Tabulate number of reads per cluster for cluster data [keyword-only, default: True]

  • verify_times (bool) – Verify that report files from later steps have later timestamps [keyword-only, default: True]

  • self_contained (bool) – Write self-contained batch files that do not require loading predecessor batches (Filter and Cluster steps), at the cost of larger files on disk [keyword-only, default: False]

  • fold (bool) – Predict the secondary structure using the reactivities [keyword-only, default: False]

  • fold_coords (Iterable) – Fold a region of a reference given its 5’ and 3’ end coordinates [keyword-only, default: ()]

  • fold_primers (Iterable) – Fold a region of a reference given its forward and reverse primers [keyword-only, default: ()]

  • fold_regions_file (str | None) – Fold regions of references from coordinates/primers in a CSV file [keyword-only, default: None]

  • fold_table_region (bool) – If no regions are specified, whether to default to the table’s region or to the full region [keyword-only, default: False]

  • fold_dry_run (bool) – Only generate the fold command and input files; do not run folding [keyword-only, default: False]

  • fold_backend (str) – Model RNA structures using RNAstructure (Fold/ShapeKnots) or ViennaRNA (RNAfold/RNAsubopt); auto selects RNAstructure for DMS and ViennaRNA for other probes [keyword-only, default: ‘auto’]

  • pseudoknots (bool) – Predict pseudoknotted structures (requires –fold-backend=RNAstructure; uses ShapeKnots when set, Fold otherwise) [keyword-only, default: False]

  • fold_temp (float) – Predict structures at this temperature (Celsius) [keyword-only, default: 37.0]

  • fold_energy_method (str) – Use this method to incorporate reactivities into folding energies. auto selects Cordero for DMS and Eddy for other probes; Eddy requires –fold-backend=ViennaRNA; Cordero requires –fold-backend=RNAstructure [keyword-only, default: ‘auto’]

  • deigan_slope (float) – Slope (kcal/mol) for SHAPE reactivities using Deigan method; used only with –fold-energy-method=Deigan [keyword-only, default: 1.8]

  • deigan_intercept (float) – Intercept (kcal/mol) for SHAPE reactivities using Deigan method; used only with –fold-energy-method=Deigan [keyword-only, default: -0.6]

  • fold_quantile (float) – Normalize and winsorize reactivities to this quantile for folding [keyword-only, default: 0.95]

  • fold_constraint (str | None) – Force bases to be paired/unpaired from a file of constraints [keyword-only, default: None]

  • fold_commands (str | None) – Command file for RNAFold [keyword-only, default: None]

  • eddy_prior_paired_file (str | None) – File of per-position prior probabilities of being paired for the Eddy method (passed as –sp-data with –sp-strategy Pp); only used with –fold-energy-method=Eddy and –fold-backend=ViennaRNA [keyword-only, default: None]

  • eddy_prior_unpaired_file (str | None) – File of per-position prior probabilities of being unpaired for the Eddy method (passed as –sp-data with –sp-strategy Pu); only used with –fold-energy-method=Eddy and –fold-backend=ViennaRNA [keyword-only, default: None]

  • fold_md (int) – Limit base pair distances to this number of bases (0 for no limit) [keyword-only, default: 0]

  • fold_mfe (bool) – Predict only the minimum free energy (MFE) structure [keyword-only, default: False]

  • fold_max (int) – Output at most this many structures (overriden by –fold-mfe) [keyword-only, default: 20]

  • fold_percent (float) – Stop outputting structures when the % difference in energy exceeds this value (overriden by –fold-mfe) [keyword-only, default: 20.0]

  • fold_edelta (float) – Maximum absolute energy difference (kcal/mol) from the MFE for suboptimal structures output by RNAsubopt (overriden by –fold-mfe) [keyword-only, default: 1.0]

  • fold_isolated (bool) – Allow isolated (non-stacked) base pairs when folding [keyword-only, default: False]

  • draw (bool) – Draw secondary structures with RNArtist. [keyword-only, default: False]

  • struct_num (Iterable) – Draw the specified structure (zero-indexed) or -1 for all structures. By default, draw the structure with the best AUROC. [keyword-only, default: ()]

  • color (bool) – Color bases by their reactivity [keyword-only, default: True]

  • draw_svg (bool) – Output each drawing in a Scalable Vector Graphics file [keyword-only, default: True]

  • draw_png (bool) – Output each drawing in a Portable Network Graphics file [keyword-only, default: False]

  • update_rnartistcore (bool) – Check for and install updates to RNArtistCore. [keyword-only, default: False]

  • export (bool) – Export each sample to SEISMICgraph (https://seismicrna.org) [keyword-only, default: False]

  • samples_meta (str) – Add sample metadata from this CSV file to exported results [keyword-only, default: None]

  • refs_meta (str) – Add reference metadata from this CSV file to exported results [keyword-only, default: None]

  • all_pos (bool) – Export all positions (not just unmasked positions) [keyword-only, default: True]

  • cgroup (str) – Put each Cluster in its own file, each K in its own file, or All clusters in one file [keyword-only, default: ‘k’]

  • graph_quantile (float) – Normalize and winsorize ratios to this quantile (0 disables) [keyword-only, default: 0.0]

  • hist_bins (int) – Number of bins in each histogram; must be ≥ 1 [keyword-only, default: 10]

  • hist_margin (float) – Autofill margins of at most this width in histograms of ratios [keyword-only, default: 0.1]

  • struct_file (Iterable) – Compare mutational profiles to the structure(s) in this CT file [keyword-only, default: ()]

  • terminal_pairs (bool) – Include terminal base pairs (at the ends of stems) in ROC curves [keyword-only, default: True]

  • window (int) – Use a sliding window of this many bases [keyword-only, default: 45]

  • winmin (int) – Mask sliding windows with fewer than this number of data [keyword-only, default: 9]

  • csv (bool) – Output the data for each graph in a Comma-Separated Values file [keyword-only, default: True]

  • html (bool) – Output each graph in an interactive HyperText Markup Language file [keyword-only, default: True]

  • svg (bool) – Output each graph in a Scalable Vector Graphics file [keyword-only, default: False]

  • pdf (bool) – Output each graph in a Portable Document Format file [keyword-only, default: False]

  • png (bool) – Output each graph in a Portable Network Graphics file [keyword-only, default: False]

  • graph_mprof (bool) – Graph mutational profiles [keyword-only, default: True]

  • graph_tmprof (bool) – Graph typed mutational profiles [keyword-only, default: True]

  • graph_ncov (bool) – Graph coverages per position [keyword-only, default: True]

  • graph_mhist (bool) – Graph histograms of mutations per read [keyword-only, default: True]

  • graph_abundance (bool) – Graph abundance of each cluster [keyword-only, default: True]

  • graph_giniroll (bool) – Graph rolling Gini coefficients [keyword-only, default: False]

  • graph_roc (bool) – Graph receiver operating characteristic (ROC) curves [keyword-only, default: True]

  • graph_aucroll (bool) – Graph rolling areas under ROC curves (AUC-ROC) [keyword-only, default: False]

  • graph_poscorr (bool) – Graph phi correlations between positions [keyword-only, default: False]

  • graph_mutdist (bool) – Graph distances between mutations [keyword-only, default: False]

  • mutdist_null (bool) – Include the null distribution of distances between mutations [keyword-only, default: True]

  • collate (bool) – Collate HTML graphs and SVG drawings into an HTML report file. [keyword-only, default: True]

  • name (str) – Prefix the HTML report with this name. [keyword-only, default: ‘collated’]

  • verbose_name (bool) – Add collated file information to report name. [keyword-only, default: False]

  • include_svg (bool) – Include RNA structure drawings from the draw module. [keyword-only, default: True]

  • include_graph (bool) – Include graphs from the graph module. [keyword-only, default: True]

  • group (str) – Group collated graphs by one of ‘sample’, ‘graph’, ‘branches’, ‘region’, or ‘all’. [keyword-only, default: ‘sample’]

  • portable (bool) – Embed collated graphs into the output HTML file for portability at the expense of live updates and file size. [keyword-only, default: False]

  • collate_out_dir (str | pathlib._local.Path | None) – Write collated report to this directory. By default, write to the lowest level directory common to all input graphs. [keyword-only, default: None]

  • seed (int | None) – Seed for the random number generator [keyword-only, default: None]