opendvp.io.DIANN_to_adata#
- DIANN_to_adata(DIANN_path, DIANN_sep='\\t', metadata_path=None, metadata_sep=',', metadata_filepath_header='File.Name', filter_contamination=True, filter_nan_genes=True, n_of_protein_metadata_cols=4)#
Converts DIANN output file and metadata file into an AnnData object.
- Parameters:
DIANN_path (str) – Path to DIANN output file.
DIANN_sep (str, default 't') – Delimiter for DIANN output file.
metadata_path (Optional[str], default None) – Path to metadata file.
metadata_sep (str, default ',') – Delimiter for metadata file.
metadata_filepath_header (str, default 'File.Name') – Name of the column in metadata file that contains the DIANN file paths.
filter_contamination (bool, default True) – If True, removes Protein.Names labelled with a
Cont_prefix.filter_nan_genes (bool, default True) – If True, removes variable rows that contain NaN in the ‘Genes’ column.
n_of_protein_metadata_cols (int, default 4) – Number of protein metadata columns at the start of the DIANN file.
- Returns:
AnnData object with imported data.
- Return type: