Coder Social home page Coder Social logo

pyahmed / pycorn Goto Github PK

View Code? Open in Web Editor NEW
43.0 6.0 25.0 592 KB

A script to extract data from ÄKTA/UNICORN result-files (.res)

Python 100.00%
chromatography science scientific-computing scientific-visualization plotting plotting-scripts python-3 python3

pycorn's People

Contributors

pyahmed avatar wackywendell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pycorn's Issues

Allow `import pycorn`

Thank you so much for making this library! It makes extracting data from those files so much easier.

The one thing I'd like is to be able to use it from other Python scripts, so I could do something like

import pycorn

data = pycorn.load(filename)

[use data somehow]

Do you mind if I start working on this and submit a pull request to you?

Thanks again for all your work on this!

Support UNICORN 7 Result Files

*.res files supported by the script are generated by UNICORN 5, however, starting from UNICORN 7 the native format for result export is a *.zip archive with some *.xml files and data containers. Would it be possible to support these, too? I would be happy to provide a sample file :)

syntax error

Hi there,

I remember using pycorn to extract data from .res files last year and it worked without any issue. I recently tried to use it again (now with .zip files from UNICORN7) but I keep getting this syntax error:

pycorn-bin.py --extract .csv sample1.res
  File "<stdin>", line 1
    pycorn-bin.py --extract .csv sample1.res
                                       ^
SyntaxError: invalid syntax

I tried using the sample file for more clarity.

I was also wondering if the switch from .res to zip files means I need to use the entire .zip folder or just the 'Result.xml' file

Pycorn does not recognize injection points properly

Hi,

I have a unicorn file with multiple injections points. However Pycorn is not able to properly recognize the injection points. In fact, it does recognize two injection points. However, these are not at the correct volume position and there are actually more than just two injection points. Any ideas on how to fix that?

I'm happy to provide the .res where the injections are not properly recognized.

Extra white space around plot

When generating a figure of certain data using the --xmax function, there is excess white space inserted below the plot. For the data file attached I have found that using --xmax 199 , or anything less, results in excess white space whereas --xmax 200 , or greater, does not.

It also does not appear to be format specific; pdf and png show the same resulting white space.

20180614_MBD2p55BR_N15_Run2_GOL_HiTrapSP_1 001 001.zip

Selecting data to plot

Question/Feature request:

Is it possible to plot only some data rows? I have multiple absorbances from different UV wavelength detectors, but at the moment I wish to plot just one or two. By default, PyCORN (using the pycorn-bin.py script) plots all the data and I don't see any parameter that would change it.

Thank you!

multiple chromatograms within one res file

Nice script! I used it to export a lot of curve data from unicorn res files to xlsx files, and it worked greatly! But each of my res files contains three distinct chromatograms (created by the unicorn 5.3.1. 'new_chromatogram' command). The script only exports the data from the last chromatogram, thus the extracted values start at i.e. 42 ml instead of 0 ml.
Is there a way to export the remaining chromatogramms too?

Many thanks in advance for your support!

problem with plotting (matplotlib)

Hi
Great script! everything works except for plotting. I dont know if it a script or pyhton error
but i cannot import matplotlib.pyplot . Matplotlib imports fine

Did you ever have this issue ?

Thx

Problems in execution - UnicodeEncodeError

Hi
This is so useful script but unfortunately I have problems in run. The "sample" archive run without problems but when I put my own UNICORN archive I receive this message:

File "C:\Program Files\Python36\Scripts\pycorn-bin.py", line 308, in data_writer1
dp = str(x) + sep + str(y) + str('\r\n')
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 49: ordinal not in range(128)

I use windows 10 and I probed the execution in python 2.7.13 and 3.6.0

Thanks a lot for the help!

Extracting data from Akta Unicorn start files

Hey there, this is an awesome idea. I wonder, would it be possible to adapt this script to also deal with files from the Akta start systems? It seems like they use an external file named results.idx as log for data naming.
best,
Silas

Enhancement: possibility to plot several data blocks on same graph

Hi,

It would be useful to have a way to plot several data blocks chosen by the user on the same graph.
Typical use cases I have in mind:

  • from affinity chromatography runs, one might want to plot UV280 and Conc on the same graph (along with fractions);
  • for some types of runs one might want to plot two or more wavelengths on the same graph (e.g. purification of DNA-binding proteins: one might want to plot UV280 and UV260 to show fractions containing DNA);
  • sometimes one doesn't need to display fractions (e.g. they were collected to analyze their content, but one only need to plot a UV data block to show elution volume from say a gel filtration run);
  • [added jan. 25th] being able to plot multiple datasets even from different files, as @wackywendell suggested, could be super useful to plot multiple gel filtration chromatograms from different runs to compare them.

I'm sure there are other use cases but those are the most typical I can think of.

Future of PyCORN

Dear Yasar,

I'm one of the developers of the open source chromatography simulator CADET (https://cadet.github.io/).

On our forum, one of our users asked about tools to automatically read data from Unicorn (https://forum.cadet-web.de/t/extracting-data-from-unicorn-files) and another user pointed us towards your tool, PyCORN.

First of all, from one open source project to another, let me thank you for providing this tool for everyone to use freely. It's highly appreciated!

We did, however, notice that the development of PyCORN seems to have become dormant and Scott informed us that you stopped working on the project. So we were wondering about your future plans with the software. Do you plan on maintaining it further? If not, would you generally be open to us taking over the project?

Obviously, it's hard to say now how exactly that would look like since there are many factors to consider but there are several options that we could generally envision.

First, we could simply contribute to your repo.
Secondly, we could fork and continue from where you left off.
Or Thirdly, we could also consider a full rewrite (inspired by your software).

So at this point, we just wanted to reach out to you to get in touch and we would be grateful for your feedback and thoughts. We're also always happy to discuss these things in a call.

Best wishes

Johannes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.