Annotation

class Annotation.MS_Template(filepath, column_name, logger=None, ingui=True, doing_normalization=False, allow_multiple_istd=False)

A class to describe the excel macro sheet MS Template Creator

Parameters:
  • filePath (str) – file path of the input MS Template Creator file

  • logger (object) – logger object created by start_logger in MSOrganiser

  • ingui (bool) – if True, print analysis status to screen

  • doing_normalization (bool) – if True, check if input file has data. If no data, throws an error

  • allow_multiple_istd (bool) – if True, allow normalization of data by mulitple internal standards

remove_whiteSpaces()

Strip the whitespaces for each string columns of a df

Parameters:

df (pandas DataFrame) – A panda data frame

Returns:

df (pandas DataFrame) – A panda data frame with white space removed

Read_Transition_Name_Annot_Sheet()

Read the excel sheet Transition_Name_Annot as a pandas data frame

Returns:

Transition_Name_Annot_df (pandas DataFrame) – A panda data frame containing the contents of Transition_Name_Annot

Read_ISTD_Annot_Sheet()

Read the excel sheet ISTD_Annot as a pandas data frame

Returns:

ISTD_Annot_df (pandas DataFrame) – A panda data frame containing the contents of ISTD_Annot

Note

Transition_Name_ISTD, ISTD_Conc_[nM] and Custom Unit are the only columns taken

Read_Sample_Annot_Sheet(MS_FilePathList=[])

Read the excel sheet Sample_Annot as a pandas data frame

Parameters:

MS_FilePathList (list) – A list of MRM transition name file names.

Note

The list of MRM transition name file names names is to help the program properly filter the Sample annotation such that we only pick rows whose Data_File_Name values is in the list. Currently, our input is set as [os.path.basename(self.MS_FilePath)] from MSAnalysis.

Returns:

Sample_Annot_df (pandas DataFrame) – A panda data frame containing the contents of Sample_Annot