opendvp.io.DIANN_to_adata#
- opendvp.io.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.
- Return type:
Parameters#
- DIANN_pathstr
Path to DIANN output file.
- DIANN_sepstr, default ‘t’
Delimiter for DIANN output file.
- metadata_pathOptional[str], default None
Path to metadata file.
- metadata_sepstr, default ‘,’
Delimiter for metadata file.
- metadata_filepath_headerstr, default ‘File.Name’
Name of the column in metadata file that contains the DIANN file paths.
- filter_contaminationbool, default True
If True, removes Protein.Names labelled with ‘Cont_’ as a prefix.
- filter_nan_genesbool, default True
If True, removes variable rows that contain NaN in the ‘Genes’ column.
- n_of_protein_metadata_colsint, default 4
Number of protein metadata columns at the start of the DIANN file.
Returns:#
- AnnData
AnnData object with imported data.