Truth.read_panel#
missionbio.demultiplex.protein.truth.Truth.read_panel
- classmethod Truth.read_panel(path: Union[str, Path]) Truth #
Reads the truth from a csv panel file.
The columns that must be present in the csv file are: “Sample_ID” and “Name” Each antibody (“Name”) can only be positive for one “Sample_ID”, which requires the values in the “Name” column to be unique.
Antibodies with NaN, “None”, or “none” for the “Sample_ID” are ignored, the remaining antibodies are used to create the Truth. The Truth contains celltypes with all the unique names present in the “Sample_ID” column. The celltypes are positive for the antibodies along which they are present in the panel file and negative for all the other antibodies. For e.g. with the following panel file
Name,Sample_ID Hashtag-1,Sample-A Hashtag-2,Sample-A Hashtag-3,Sample-B CD3,None CD4,
The Truth that would be generated would be as follows:
None -> Sample-A: Hashtag-1+, Hashtag-2+, Hashtag-3- None -> Sample-B: Hashtag-1-, Hashtag-2-, Hashtag-3+
- Parameters:
path – The path to the csv file.
- Returns:
Truth
< Class Truth