Read one or more “.vienna” or “.ct” format secondary structure files and ouput records that are not excluded in the correpsonding exclusion table.

This script takes one or more fold files in “Vienna” (Vienna Format) or “CT” (CT Format) formats, as well as an “exclusion table” generated by hyb_exclude_fold to filter the fold file to only those records not excluded in the exclusion table.

Example System Calls:
hyb_exclude_fold -f my_file_1.vienna -e my_file_1_exclude.csv

hyb_exclude_fold -f my_file_1.ct my_file_2.ct                              -e my_file_1_exclude.csv my_file_2_exclude.csv
Output File Naming:

Output files can be named in two fashions: via automatic name generation, or by providing specific out file names.

Automatic Name Generation:

For output name generation, the default respective naming scheme is used:

hyb_script -i PATH_TO/MY_FILE_1.HYB [...]

This output file path can be modified with the arguments {–out_dir, –out_suffix} described below.

The output directory defaults to the current working directory ($PWD), and can be modified with the --out_dir <dir> argument. Note: The provided directory must exist, or an error will be raised. For Example:

hyb_script -i PATH_TO/MY_FILE_1.HYB [...] --out_dir MY_OUT_DIR

The suffix used for output files is based on the primary actions of the script. It can be specified using --out_suffix <suffix>. This can optionally include the “.hyb” final suffix. for Example:

hyb_script -i PATH_TO/MY_FILE_1.HYB [...] --out_suffix MY_SUFFIX
hyb_script -i PATH_TO/MY_FILE_1.HYB [...] --out_suffix MY_SUFFIX.HYB
Specific Output Names:

Alternatively, specific file names can be provided via the -o/–out_hyb argument, ensuring that the same number of input and output files are provided. This argument takes precedence over all automatic output file naming options (–out_dir, –out_suffix), which are ignored if -o/–out_hyb is provided. For Example:

hyb_script [...] --out_hyb MY_OUT_DIR/OUT_FILE_1.HYB MY_OUT_DIR/OUT_FILE_2.HYB
    -->  MY_OUT_DIR/OUT_FILE_1.hyb
    -->  MY_OUT_DIR/OUT_FILE_2.hyb

Note: The directory provided with output file paths (MY_OUT_DIR above) must exist, otherwise an error will be raised.

usage: hyb_exclude_fold [-h] -f PATH_TO/MY_FILE.VIENNA
                        [PATH_TO/MY_FILE.VIENNA ...]
                        [-o PATH_TO/OUT_FILE.VIENNA [PATH_TO/OUT_FILE.VIENNA ...]]
                        [-d OUT_DIR] [-u OUT_SUFFIX] -e EXCLUSION_TABLE
                        [EXCLUSION_TABLE ...] [-v | -s]
                        [--allowed_mismatches ALLOWED_MISMATCHES]
                        [--fold_placeholder FOLD_PLACEHOLDER]
                        [--foldrecord_type {strict,dynamic}]
                        [--foldfile_error_mode {raise,return,warn_return}]

Named Arguments

-f, --in_fold

REQUIRED path to one or more RNA secondary-structure files with a “.vienna” or “.ct” suffix for use in the evaluation.

-o, --out_fold

Optional path to one or more “.vienna” or “.ct”-format files for output (should include appropriate “.vienna”/”.ct” suffix). If not provided, the output for input file “PATH_TO/MY_FILE.VIENNA” will be used as a template for the output “OUT_DIR/MY_FILE_OUT.VIENNA”.

-d, --out_dir

Path to directory for output of evaluation files. Defaults to the current working directory.

Default: $PWD

-u, --out_suffix

Suffix to add to the name of output files, before any file- or analysis-specific suffixes. The file-type appropriate suffix will be added automatically.

Default: “_filtered”

-e, --exclusion_table

Exclusion table(s) corresponding to input files, generated by hyb_filter

-v, --verbose

Print verbose output during run.

Default: False

-s, --silent

Print no output during run.

Default: False

Fold Record Settings


For DynamicFoldRecords, allowed number of mismatches with a HybRecord.

Default: 0


Placeholder character/string for missing data for reading/writing fold records.

Default: “.”

Fold File Settings


Possible choices: strict, dynamic

Type of fold record object to use. Options: “strict”: FoldRecord, requires an exact sequence match to be paired with a HybRecord; “dynamic”: DynamicFoldRecord, requires a sequence match to the “dynamic” annotated regions of a HybRecord, and may be shorter/longer than the original sequence.

Default: “strict”


Possible choices: raise, return, warn_return

Mode for handling errors during reading of HybFiles (overridden by HybFoldIter.settings[‘error_mode’] when using HybFoldIter). Options: “raise”: Raise an error when encountered and exit program; “warn_return”: Print a warning and return the error_value ; “return”: Return the error value with no program output. record is encountered.

Default: “raise”