Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

access fileDescription #223

Open
jonas87 opened this issue May 9, 2020 · 2 comments
Open

access fileDescription #223

jonas87 opened this issue May 9, 2020 · 2 comments
Labels
feature Add new functionality good first issue Improvement extend functionality

Comments

@jonas87
Copy link

jonas87 commented May 9, 2020

I went through the documentation but didn't find how to access the information inside specific xml elements inside the mzml file, like for example
What I'm doing now is accessing the chromatogram data with pymzML and loading the file another time with Beautiful Soup to access the information inside specific xml elements.

@MKoesters
Copy link
Contributor

Hi Jonas,

Accessing the information using BeautifulSoup is of course not optimal ..
Do you want to access all the cvParams in fileDescription?
Currently, all params in the spectrum elements are accessible but not the ones in the mzML "header"
However it should not be hard to implement.

Could you tell me a bit more which information you are trying to access?

Best,
Manuel

@jonas87
Copy link
Author

jonas87 commented May 13, 2020

Hi Manuel,

I needed the name of the source file, which is available in the fileDescription/sourceFileList/sourceFile tag, see attached file. (fileDescription is a direct child of )

Don't do this on my behalf though, Im using lxml now to access this, as well as the chromatogram data (which I'm decoding with base64, zlib and struct). My use case is actually simple enough that I don't need pymzML

example.txt

@MKoesters MKoesters self-assigned this May 15, 2020
@MKoesters MKoesters added Improvement extend functionality feature Add new functionality labels Jun 24, 2020
@MKoesters MKoesters removed their assignment Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Add new functionality good first issue Improvement extend functionality
Projects
None yet
Development

No branches or pull requests

2 participants