Skip to content

reads a row from an excel file and obtains maximum value

Notifications You must be signed in to change notification settings

apeden/excelMaxRow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

119 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

excelMaxRow

Programme for analysing RTQuIC data using python in concert with MS Excel. RT-QuIC is a method for detecting prions that generates numeric data in rows. The data can be exported as excel files

Installation

This repository only contains source code at the moment. The can be run using IDLE, Spider, Thorny etc

Usage

The programme extracts numeric RTQuIC data from an excel file. It can compute a number of values of interest to RT-QuIC users. It can place these computed values conveniently in an excel destination file.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please contact me (Alex Peden)

License

[MIT](https://choosealicense.com/licenses/mit/)

Acknowledgements

I need to acknowledge the people who wrote the Python programming language and the pandas and numpy libraries in particular.

Plotting a single RT-QuIC traces selected from a dataframe

Once a dataframe has been generated from multiple excel files it is possible to use a function called tracePlot to plot a single trace. The trace can be selected by supplying two arguments: the name of the excel file, and the sample label. An example plot is shown below.

Single trace

Plotting multiple traces

Using a function called tracePlot you can plot multiple traces:

Multiple traces

In the above example, 9 traces are plotted

  • y axis : flourescence values
  • x axis : time in hours
  • horizontal line
  • green: baseline threshold, base + 5 standard deviations
  • blue: lag value (three times base, if achieved)
  • red: maximum value
  • orange line: gradient of log growth phase

Features

  • lag time
  • Value at lag time
  • Time to maximum value
  • Maximum value
  • Gradient of growth phase
  • Baseline value
  • Baseline threshold
  • Time to breaching baseline threshold
  • Area under the curve

Plotting two features on a scattergram

Using this programme, it is possible to generate a data frame of features and then select two of these features for plotting a scattergram. The following example shows the area under the curve (AUC) plotted against Time to maximum value. The features have been scaled to between 0 (minimum) and 1 (maximum).

AUC versus time to max

  • blue : positive controls
  • red: blinded positive controls
  • green: negative controls
  • cyan: the test samples

Another example, this time of AUC versus lagtime is shown below

AUC versus time to max

Best features for decriminating positive from negatives

An important question is what combination of features best discriminates a positive sample from a negative sample. If we restrict the number of features to 6, there are (6(6-1))/2 = 15 pairwise combinations of features.

Plotting a scatter matrix

It is possible to plot a scatter_matrix of scattergrams using the matplotlip.plotting module this programme. The datapoints in this scattergram are normalised as above. The scatter_matrix provides a convenient way for searching for correlations in the data.

Scatter_matrix

Plotting a correlation heatmap

Using functions within dataframe and matplotlib it is possible to plot a heat map of pair-wise correlations between variable. Green indicates minimal correlation, yellow is a positive correlation and blue a negative correlation. If one is looking for clusters by plotting two variables against each other, it's probably a good idea to chose two variables that are minimally correlated.

Scatter_matrix

Using stripplots to focus in on one particular feature of the RT-QuIC data

Once the features have been calculated and put into a pandas dataframe, a useful method for plotting the data is strip plots. Seaborn is a useful library for plotting stripplots. The following figure shows the effect of various concentrations of a chemical on the conversion time (lag time). The chemical has a moderating effect, even down to quite low concentrations.

Surf_conc

In contrast, another chemical does not appear to inhibit conversion to any significant degree.

Surf_conc2

some text

About

reads a row from an excel file and obtains maximum value

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages