fast_conformation package

Subpackages

Submodules

fast_conformation.fast_conformation module

fast_conformation.fast_conf_init module

fast_conformation.fast_conformation_init.main()[source]

fast_conformation.jackhmmer_msa module

fast_conformation.jackhmmer_msa.build_jackhmmer_msa(config)[source]

Build the MSA using jackhmmer for the target sequence based on the provided configuration.

Parameters:

config (dict) – Configuration dictionary containing all necessary parameters.

fast_conformation.jackhmmer_msa.build_msa(sequence, jobname, complete_output_dir, homooligomer, tmp_dir, use_ramdisk)[source]

Build the MSA using jackhmmer for the target sequence.

Parameters:
  • sequence (str) – The target sequence for MSA.

  • jobname (str) – The job name.

  • complete_output_dir (str) – The output directory path.

  • homooligomer (int) – The number of copies of the protein.

  • tmp_dir (str) – Temporary directory path.

  • use_ramdisk (bool) – Whether to use a RAM disk for the process.

fast_conformation.jackhmmer_msa.convert_msa(filename)[source]

Convert the MSA pickle file to a formatted sequence list.

Parameters:

filename (str) – Path to the MSA pickle file.

Returns:

Converted and formatted sequences from the MSA.

Return type:

list

fast_conformation.jackhmmer_msa.load_config(file_path)[source]

Load the configuration file in JSON format.

Parameters:

file_path (str) – Path to the configuration file.

Returns:

Configuration dictionary with default values if the file is not found or if there’s an error in reading the file.

Return type:

dict

fast_conformation.jackhmmer_msa.main()[source]

Main function that handles command-line arguments and initiates the MSA building process.

fast_conformation.jackhmmer_msa.prepare_os()[source]

Prepare the operating system environment by creating a RAM disk.

fast_conformation.jackhmmer_msa.reformat_sequences(input_msa)[source]

Reformat sequences from MSA for use in colabfold_batch.

Parameters:

input_msa (list) – List of sequences from the MSA.

Returns:

Formatted sequences in FASTA format.

Return type:

list

fast_conformation.jackhmmer_msa.save_formatted_sequences_to_file(formatted_sequences, output_file)[source]

Save the formatted sequences to a file.

Parameters:
  • formatted_sequences (list) – List of formatted sequences.

  • output_file (str) – Path to save the formatted sequences.

fast_conformation.mmseqs2_msa module

fast_conformation.mmseqs2_msa.copy_msa_and_clean(src_file_path, dest_dir_path)[source]

Clean up and copy the MSA file to the destination directory.

Parameters:
  • src_file_path (str) – Path to the source MSA file.

  • dest_dir_path (str) – Path to the destination directory.

Raises:

OSError – If the source directory cannot be deleted.

fast_conformation.mmseqs2_msa.get_mmseqs_msa(sequence_file_path, output_path, jobname, env)[source]

Run mmseqs2 to generate the MSA (Multiple Sequence Alignment) for the target sequence.

Parameters:
  • sequence_file_path (str) – Path to the file containing the target sequence.

  • output_path (str) – Directory path to save the output results.

  • jobname (str) – Name of the job.

  • env (dict) – Environment variables for the subprocess.

Raises:

RuntimeError – If the subprocess fails to execute.

fast_conformation.mmseqs2_msa.load_config(config_file)[source]

Load the configuration from a JSON file.

Parameters:

config_file (str) – Path to the configuration file.

Returns:

Configuration dictionary with default values if the file is not found or if there’s an error in reading the file.

Return type:

dict

fast_conformation.mmseqs2_msa.main()[source]

Main function to parse command-line arguments and execute the MSA pipeline.

fast_conformation.mmseqs2_msa.remove_duplicate_sequences(input_file)[source]

Remove duplicate sequences from a FASTA file.

Parameters:

input_file (str) – Path to the FASTA file containing sequences.

fast_conformation.mmseqs2_msa.remove_first_line(file_path)[source]

Remove the first line from a file.

Parameters:

file_path (str) – Path to the file to modify.

fast_conformation.mmseqs2_msa.run_mmseqs2_msa(config)[source]

Run the full MSA pipeline using mmseqs2.

Parameters:

config (dict) – Configuration dictionary containing necessary parameters.

fast_conformation.mmseqs2_msa.save_config(config, file_path)[source]

Save the configuration to a JSON file.

Parameters:
  • config (dict) – Configuration dictionary to save.

  • file_path (str) – Path to save the configuration file.

fast_conformation.mmseqs2_msa.validate_inputs(fasta_path, output_path, jobname)[source]

Validate the inputs to ensure they are correct.

Parameters:
  • fasta_path (str) – Path to the FASTA file containing the target sequence.

  • output_path (str) – Directory path to save the output results.

  • jobname (str) – Name of the job.

Raises:

ValueError – If the FASTA path is not a valid file, the output path is not a valid directory, or the jobname is not a string.

fast_conformation.pca_clustering module

fast_conformation.pca_clustering.main()[source]

Main function to parse arguments and run PCA analysis.

fast_conformation.pca_clustering.run_pca_analysis(config, widget=None)[source]

Run PCA analysis based on the provided configuration.

Parameters: config (dict): Configuration dictionary containing parameters for the analysis. widget (object, optional): Widget for displaying results (default is None).

Raises: NotADirectoryError: If the specified output path is not a directory.

fast_conformation.predict_conformation module

fast_conformation.rmsd_mode1d module

fast_conformation.rmsd_mode1d.main()[source]

Main function to parse arguments and run RMSD analysis.

fast_conformation.rmsd_mode1d.run_rmsd_analysis(config, plot_widget=None)[source]

Run RMSD analysis based on the provided configuration.

Parameters: config (dict): Configuration dictionary containing parameters for the analysis. plot_widget (object, optional): Plot widget for displaying results (default is None).

Raises: NotADirectoryError: If the specified output path is not a directory.

fast_conformation.rmsd_mode2d module

fast_conformation.rmsd_mode2d.main()[source]

Main function to parse arguments and run 2D RMSD analysis.

fast_conformation.rmsd_mode2d.run_2d_rmsd_analysis(config, widget=None)[source]

Run 2D RMSD analysis based on the provided configuration.

Parameters: config (dict): Configuration dictionary containing parameters for the analysis. widget (object, optional): Widget for displaying results (default is None).

Raises: NotADirectoryError: If the specified output path is not a directory.

fast_conformation.rmsf_plddt module

fast_conformation.rmsf_plddt.main()[source]

Main function to parse arguments and run RMSF analysis.

fast_conformation.rmsf_plddt.run_rmsf_analysis(config, widget=None)[source]

Run RMSF analysis based on the provided configuration.

Parameters: config (dict): Configuration dictionary containing parameters for the analysis. widget (object, optional): Widget for displaying results (default is None).

Raises: NotADirectoryError: If the specified output path is not a directory.

fast_conformation.save_traj module

fast_conformation.save_traj.run_trajectory_saving(config)[source]

Run the process of saving ensemble predictions as trajectories.

Parameters:

config (dict) –

Configuration dictionary containing the following keys: - output_path (str): Path to save the output trajectories. - predictions_path (str, optional): Path to the predictions directory. If not provided, it defaults to the

predictions directory within the output path.

  • seq_pairs (list): List of sequence pairs for the analysis.

  • jobname (str): Name of the job.

  • analysis_range (tuple): The range of residues or frames to analyze.

  • analysis_range_name (str): The name associated with the analysis range.

  • reorder (str, optional): Reordering method to use (e.g., RMSD, TMSCORE, PCA).

  • traj_format (str): Format to save the trajectory (e.g., PDB, DCD).

  • engine (str): The molecular dynamics engine used (e.g., AlphaFold, Rosetta).

  • starting_residue (int, optional): The starting residue number for the trajectory.

Raises:

NotADirectoryError – If the specified output path is not a directory.

fast_conformation.tmscore_mode1d module

fast_conformation.tmscore_mode1d.main()[source]

Main function to parse arguments and run TM-Score analysis.

fast_conformation.tmscore_mode1d.run_tmscore_analysis(config, plot_widget=None)[source]

Run TM-Score analysis based on the provided configuration.

Parameters: config (dict): Configuration dictionary containing parameters for the analysis. plot_widget (object, optional): Widget for displaying results (default is None).

Raises: NotADirectoryError: If the specified output path is not a directory.

fast_conformation.tmscore_mode2d module

fast_conformation.tmscore_mode2d.main()[source]

Main function to parse arguments and run 2D TM-Score analysis.

fast_conformation.tmscore_mode2d.run_2d_tmscore_analysis(config, widget=None)[source]

Run 2D TM-Score analysis based on the provided configuration.

Parameters: config (dict): Configuration dictionary containing parameters for the analysis. widget (object, optional): Widget for displaying results (default is None).

Raises: NotADirectoryError: If the specified output path is not a directory.

Module contents