Thursday, June 16, 2016

How to do X? (add your own please!)

Here is a list of "X" (please add your own) (I would be happy to share my solutions/explain them)

1) Read a data file (containing rows and columns)
2) Plot one column of data against another column of data
3) plot data from one row against another row
4) Do a linear least squares fit (e.g. Y versus X) - calculate slope, intercept
5) Do a polynomial fit (Y versus X) (plot the data)
6) Read a protein (or DNA/RNA) sequence (from a data file in fasta OR genbank or ... formats)
7) Get information about a protein (or DNA/RNA) sequence (length of sequence, C+G, etc)
8) Read/write excel file (as xlsx, csv, txt)na
9) Solve vapor/liquid equilibrium problems (Antoine's equation, Raoult's law ...)
10) Solve set of linear equations (AX = B)
11) Solve non linear equations
12) Calculate volume roots of cubic equations of state
13) Set up and solve problems in enzyme kinetics (set of ordinary differential equations, Michaelis Menten form, etc)
14) Solve problems involving filtration (Darcy's Law)

And now for some "X"'s I have a very limited experience with/written software for

15) Read an image (tiff, jpg, png) - and run filters (low pass, high pass, band pass)
16) Locate spots on an image (microarray analysis of tiff images - locate center of spot, determine background intensities)
16) BLAST sequences at the NCBI - parse output according to defined criteria
17) Align two sequences using dynamic programming techniques (SmithWaterman (local) and Needleman Wunsch (global)




1 comment:

  1. 18) How to protect a variable that is set based on a different variable.
    May be best just to illustrate:

    x=[1,2]
    b=(x)
    x.append(3)
    print b

    When b prints it is [1,2,3].
    I read that this may has something to do with the way python does some weird form of call-by-reference or something. Is there a way to get around it? In my problem, x and b are a bit more complicated, but basically I want to access the older form of a variable I've been changing. Is there a way to "protect" b for later use?

    My one other thought would be to just duplicate the code where I initially set the x value, i.e.:
    x=[1,2]
    b=[1,2]
    x.append(3)
    print b

    [1,2]

    but the problem is that it is not a simple two-variable list, and duplicating x would require me to re-do (really just copy/paste) quite a bit of code.

    Is there a better way?

    Thanks,
    Elijah

    ReplyDelete