stiffness package

Submodules

stiffness.average_stiffness module

Module containing the AverageStiffness class and the command line interface.

class stiffness.average_stiffness.AverageStiffness(input_ser_path, output_csv_path, output_jpg_path, properties=None, **kwargs)[source]

Bases: biobb_common.generic.biobb_object.BiobbObject

biobb_dna AverageStiffness
Calculate average stiffness constants for each base pair of a trajectory’s series.
Parameters
  • input_ser_path (str) – Path to .ser file for helical parameter. File is expected to be a table, with the first column being an index and the rest the helical parameter values for each base/basepair. File type: input. Sample file. Accepted formats: ser (edam:format_2330).

  • output_csv_path (str) –

    Path to .csv file where output is saved. File type: output. Sample file. Accepted formats: csv (edam:format_3752).

  • output_jpg_path (str) –

    Path to .jpg file where output is saved. File type: output. Sample file. Accepted formats: jpg (edam:format_3579).

  • properties (dict) –

    • KT (float) - (0.592186827) Value of Boltzmann temperature factor.

    • sequence (str) - (None) Nucleic acid sequence corresponding to the input .ser file. Length of sequence is expected to be the same as the total number of columns in the .ser file, minus the index column (even if later on a subset of columns is selected with the usecols option).

    • helpar_name (str) - (None) helical parameter name.

    • seqpos (list) - (None) list of sequence positions (columns indices starting by 0) to analyze. If not specified it will analyse the complete sequence.

    • remove_tmp (bool) - (True) [WF property] Remove temporal files.

    • restart (bool) - (False) [WF property] Do not execute if output files exist.

Examples

This is a use example of how to use the building block from Python:

from biobb_dna.stiffness.average_stiffness import average_stiffness

prop = {
    'helpar_name': 'twist',
    'sequence': 'GCAT',
}
average_stiffness(
    input_ser_path='/path/to/twist.ser',
    output_csv_path='/path/to/table/output.csv',
    output_jpg_path='/path/to/table/output.jpg',
    properties=prop)
Info:
launch() int[source]

Execute the AverageStiffness object.

stiffness.average_stiffness.average_stiffness(input_ser_path: str, output_csv_path: str, output_jpg_path: str, properties: Optional[dict] = None, **kwargs) int[source]

Create AverageStiffness class and execute the launch() method.

stiffness.average_stiffness.main()[source]

Command line execution of this building block. Please check the command line documentation.

stiffness.basepair_stiffness module

Module containing the HelParStiffness class and the command line interface.

class stiffness.basepair_stiffness.BPStiffness(input_filename_shift, input_filename_slide, input_filename_rise, input_filename_tilt, input_filename_roll, input_filename_twist, output_csv_path, output_jpg_path, properties=None, **kwargs)[source]

Bases: biobb_common.generic.biobb_object.BiobbObject

biobb_dna BPStiffness
Calculate stiffness constants matrix between all six helical parameters for a single base pair step.
Parameters
  • input_filename_shift (str) –

    Path to csv file with data for helical parameter ‘shift’. File type: input. Sample file. Accepted formats: csv (edam:format_3752)

  • input_filename_slide (str) –

    Path to csv file with data for helical parameter ‘slide’. File type: input. Sample file. Accepted formats: csv (edam:format_3752)

  • input_filename_rise (str) –

    Path to csv file with data for helical parameter ‘rise’. File type: input. Sample file. Accepted formats: csv (edam:format_3752)

  • input_filename_tilt (str) –

    Path to csv file with data for helical parameter ‘tilt’. File type: input. Sample file. Accepted formats: csv (edam:format_3752)

  • input_filename_roll (str) –

    Path to csv file with data for helical parameter ‘roll’. File type: input. Sample file. Accepted formats: csv (edam:format_3752)

  • input_filename_twist (str) –

    Path to csv file with data for helical parameter ‘twist’. File type: input. Sample file. Accepted formats: csv (edam:format_3752)

  • output_csv_path (str) –

    Path to directory where stiffness matrix file is saved as a csv file. File type: output. Sample file. Accepted formats: csv (edam:format_3752)

  • output_jpg_path (str) –

    Path to directory where stiffness heatmap image is saved as a jpg file. File type: output. Sample file. Accepted formats: jpg (edam:format_3579)

  • properties (dict) –

    • KT (float) - (0.592186827) Value of Boltzmann temperature factor.

    • scaling (list) - ([1, 1, 1, 10.6, 10.6, 10.6]) Values by which to scale stiffness. Positions correspond to helical parameters in the order: shift, slide, rise, tilt, roll, twist.

    • remove_tmp (bool) - (True) [WF property] Remove temporal files.

    • restart (bool) - (False) [WF property] Do not execute if output files exist.

Examples

This is a use example of how to use the building block from Python:

from biobb_dna.stiffness.basepair_stiffness import basepair_stiffness

prop = {
    'KT': 0.592186827,
    'scaling': [1, 1, 1, 10.6, 10.6, 10.6]
}
basepair_stiffness(
    input_filename_shift='path/to/basepair/shift.csv',
    input_filename_slide='path/to/basepair/slide.csv',
    input_filename_rise='path/to/basepair/rise.csv',
    input_filename_tilt='path/to/basepair/tilt.csv',
    input_filename_roll='path/to/basepair/roll.csv',
    input_filename_twist='path/to/basepair/twist.csv',
    output_csv_path='path/to/output/file.csv',
    output_jpg_path='path/to/output/plot.jpg',
    properties=prop)
Info:
launch() int[source]

Execute the BPStiffness object.

stiffness.basepair_stiffness.basepair_stiffness(input_filename_shift: str, input_filename_slide: str, input_filename_rise: str, input_filename_tilt: str, input_filename_roll: str, input_filename_twist: str, output_csv_path: str, output_jpg_path: str, properties: Optional[dict] = None, **kwargs) int[source]

Create BPStiffness class and execute the launch() method.

stiffness.basepair_stiffness.main()[source]

Command line execution of this building block. Please check the command line documentation.