In-Depth Python usage
This section of the Docs is to describe each function and its utility in the ProcessMRXS Class.
Functions specifics
Call the process_data method to process MRXS data, merge it with inventory, and calculate immunopositivity statistics for every slide (this function is called internally for each file in the process_directory method):
result_df = processor.process_data()
To process immunopositivity rate from Excel/CSV files and merge into a unique main DataFrame, call the process_positivity method:
xlsx_file = "path/to/your/immunopositivity_data.xlsx" final_df = ProcessMRXSData.process_positivity(xlsx_file, result_df)
Process MRXS data from a directory, save antibody-specific data, and return the final DataFrame using the process_directory method (internally calling the process_data):
directory_path = "path/to/your/mrxs/files/directory" output_path = "path/to/output/data/directory" output_filename = "output_data.csv" # Name of the output CSV file final_data = ProcessMRXSData.process_directory(directory_path, inventory_file, output_path, output_filename)
Process immunopositivity rate from saved files and merge it into a final DataFrame using the process_rate method:
final_rate = ProcessMRXSData.process_rate(output_path, final_data)
To generate and save correlation heatmaps based on immunopositivity rate data, call the process_heatmaps method:
data_file = "path/to/your/immunopositivity_data.csv" ProcessMRXSData.process_heatmaps(data_file)
To generate and save scatterplots based on immunopositivity rate data, use the process_scatterplots method:
data_file = "path/to/your/immunopositivity_data.csv" ProcessMRXSData.process_scatterplots(data_file)
For more details, examples, and command-line usage, please refer to the code and documentation in this repository.
License
This project is licensed under the MIT License - see the LICENSE file for details to the rightful owner.
Last updated