Modules and functions in this package

List of available modules and functions and descriptions

Superimposition-based approach modules

Check Stoichometry module

To import this any function within this module, use the next import

>> from sbiRandM.check_stoichometry import *

Available functions

check_fasta_stoichometry(fasta_path):

    """
    Input: path to the desired fasta file (string)
    Output: Dictionary with the stoichiometry done

    This function takes the path of the Fasta file of the Complex, 
    and checks the homology between chains
    to detect the steichiometry of the protein.
    """

Complex_build module

To import any function within this module, use the next import

>> from sbiRandM.complex_build import *

Available function

compute_equal_chain(s1,s2):

    """
    Input: Two Biopython PDB structures of an interaction
    Output: A list of Atoms corresponding to the same chain
    """
check_chain_addition(complexPDB, chain, pairwise_dict, stechiometryDict):
    
    """
    Input: Protein's PDB, it's chain and two dictionaries, 
    the results of the pairwise alignment and the calculation 
    of the stechiometry

    Output: the common chains.

    The function looks wether the pdb complex and the chain that 
    we want to add have an interaction. 
    """
build_complex(file1,file2):

    """
    Input: two files with pub interactions
    Output: File path of the complex PDB File

    This function takes the complex output file 
    (or in the first iteration one of the pairwise interactions) 
    and another pairwise interaction PDB complex. 
    Then it tries to add the chain to the complex until there is 
    not clash
    """
rename_complex_chains(file):

    """
    Input: PDB file
    Output: PDB file with the chains named

    This function takes a PDB file, delete all the END lines, 
    and rename the chains according to Alphabet found in data module.
    """
execute_complex(stechiometry_dict, pairwise_dict, args):

    """
    Input: Both dictionaries result of the stechiometry and the 
    alignment and some arguments.
    Output: the complex
    """

Interaction Module

For using this module and the functions inside it, use the next command

>> from sbiRandM.interaction_module import *

Available functions

check_homology(fasta1,fasta2):

    """
    Input: Two fasta sequences
    Output: Boolean variable indicating if the sequence are homologous

    his function check the identity percentage between two chains, 
    and returns True if they are homologous or False if they are not. 
    The threshold is currently at 70%.
    """
Get_fasta(chain):

    """
    Input: Biopython PDB Chain object
    Output: String of the sequence of Aminoacids of the PDB Chain Object

    This function takes as input a Biopython PDB Chain object, 
    and parse it into a sequence of aminoacids.
    """
check_clash(structure_complex, mobile_chain):

    """
    Input: Biopython object of the actual complex and 
    Biopython object of the moving chain
    Output: True or False wether the chain is clashing or 
    not with the complex
    """
obtain_pairwise_dict(steichiometry_dict, TMP_folder):

    """
    Input:Steichiometry dict with the next format.
         Name of the chain : 
             Steichiometry - Absolute number that the 
                             chain appear in the Fasta.
             Sequence - Sequence of the chain

    Output:Dictionary with the next keys:
      [Name of Chain] - 
          [Name of chain in the interaction] - 
               [Path to that PDB file]
               
       This function parse a folder full with PDB of the pairwise 
       interactions, and parse them into a dictionary that contains 
       as keys the interacting chains, and as value, 
       the path of the file that contains the structure 
       of the interaction.
   """

Modeling-based approach Modules

Modeller Comparison Module

For using this module and the functions inside it, use the next command

>> from sbiRandM.modeller_comparison import *

Available functions

fasta_to_object(fasta):

    """
    Input: File with Fasta
    Output: Query object.

    This function takes a fasta file with several chains, 
    and parse it into a query object. 
    Also changes the DNA chains to Placeholder characters.
    """
create_models(folder):

    """
    Input folder: Folder where you store the 
    pairwise complexes of the protein
    Output: List of Protein_Interaction objects

    This function takes a folder that contains the 
    complexes of the pairwise interactions, 
    parse them and return a list of Protein_Interaction 
    objects with information bout the location and the sequences.
    """
check_similarity(query, interactions_list):

    """
    Input: Query instance and a list of interactions
    Output: The interaction dict updated

    This function takes a query object and a 
    list of Pairwise interaction objects, 
    returns the interaction list with the attribute 
    "originalChain" updated for each chain of the 
    pairwise interactions.  
    First it tries to check if the sequence of 
    interaction is a subset.
    If not, it checks over a 73% of similarity
    """
generate_alignment(query, interactions, output_folder):

    """
    Input: Query instance, the interaction file and the 
    output where the files will be (a path).
    Output: the files in the path.
    """
make_model(output_folder, interaction_pdb_folder, fasta):

    """
    Input: the pdbs, the fasta and the output folder
    Output: the files in the directory
    """
separe_interactions(interactions):

    """
    This function takes a list of protein pairwise interactions, 
    that have more than originalChain (When mapping to homodimers) 
    and divide them into several objects, with one chain for each.
    """
remove_duplicate_chains(folder):

    """
    This function removes duplicates and gets a 
    print in the terminal as an output.
    """

Last updated

Was this helpful?