-
Notifications
You must be signed in to change notification settings - Fork 26
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
Generalize data source #1775
Comments
This is related to this issue in order to keep in cache the data (and possibly the parsed data). In the current situation we have: {
"version": 3,
"spectra": [
{
"id": "53f1ff98-d146-4444-9a79-bbf8ee40102a",
"source": {
"jcampURL": "./data/cytisine/2d/COSY_Cytisin.dx",
"jcampSpectrumIndex": 0
}
},
{
"id": "f1ff98d1-46e4-44da-b9bb-f8ee40102a69",
"source": {
"jcampURL": "./data/cytisine/2d/COSY_Cytisin.dx",
"jcampSpectrumIndex": 1
}
}
], In the future we should have something like: {
"version": 3,
"spectra": [
{
"id": "53f1ff98-d146-4444-9a79-bbf8ee40102a",
"source": {
"fileCollection": [
{
"name": "COSY_Cytisin.dx",
"size": 1234,
"relativePath": "data/cytisine/2d/COSY_Cytisin.dx",
"lastModified": 234234,
"jcampSpectrumIndex": 0
}
]
}
},
{
"id": "f1ff98d1-46e4-44da-b9bb-f8ee40102a69",
"source": {
"fileCollection": [
{
"name": "COSY_Cytisin.dx",
"size": 1234,
"relativePath": "data/cytisine/2d/COSY_Cytisin.dx",
"lastModified": 234234,
"jcampSpectrumIndex": 1
}
]
}
}
]
} The goal here is that the source could be as well a list of files for a Bruker Experiment. Thinking about NMReData we will also need to know the index of each spectrum. |
This deal only with the local files which is not always the case, we should keep it general and instead of have |
@jobo322 This feature will have to be implemented in nmr-load-save. Is there some obvious problems with this approach ? |
we need to consider if the remote file is a zip file |
This is managed by filelist-utils. It should be transparent. |
what is going to be the behavior if you drag and drop a zip file, filelist-util will unzip the files and once you export as .nmrim will get the unzip files in the |
If you drag and drop something the source should stay empty. It is only when the data are coming from a server that we can store relative path to the '.nmrium' source file. This could change in the future if we implement: https://developer.mozilla.org/en-US/docs/Web/API/FileSystem |
How to deal with zip files ? {
"version": 3,
"spectra": [
{
"id": "53f1ff98-d146-4444-9a79-bbf8ee40102a",
"source": {
"fileCollection": [
{
"name": "data.zip",
"size": 1234,
"relativePath": "data/data.zip",
"lastModified": 234234,
}
],
"filter": {general: {keepFID: true, keepFT: false}, bruker: {expno:'10'}}
}
},
{
"id": "f1ff98d1-46e4-44da-b9bb-f8ee40102a69",
"source": {
"fileCollection": [
{
"name": "data.zip",
"size": 1234,
"relativePath": "data/data.zip",
"lastModified": 234234,
}
],
"filter": {general: {keepFID: false, keepFT: true}, bruker: {expno:'10'}}
}
},
{
"id": "f1ff98d1-46e4-44da-b9bb-f8ee40102a69",
"source": {
"fileCollection": [
{
"name": "data.fid",
"size": 1234,
"relativePath": "data/data.fid",
"lastModified": 234234,
},
{
"name": "data.acqu",
"size": 1234,
"relativePath": "data/data.acqu",
"lastModified": 234234,
},
{
"name": "data.acqus",
"size": 1234,
"relativePath": "data/data.acqus",
"lastModified": 234234,
}
],
"filter": {general: {keepFID:1}, bruker: {expno:'11'}}
}
},
{
"id": "f1ff98d1-46e4-44da-b9bb-f8ee40102a69",
"source": {
"fileCollection": [
{
"name": "test.jdx",
"size": 1234,
"relativePath": "data/text.jdx",
"lastModified": 234234,
}
],
"filter": {general: {keepFID:1}, jcamp: {index:'2'}}
}
}
]
} / |
@CS76 In the zip files you store on the server do you have one or many experiments ? Meaning for Bruker do you have 1h, cosy, tocsy in the same zip or one experiment per zip ? |
@lpatiny Currently, we are loading a single experiment at a time through one zip file via a URL provided to nmrium. Zip files are generated by nmrXiv, so we have total flexibility in generating them. Say one experiment per zip or multiple experiments (1h, cosy, tocsy) in a single zip (also, we generate these zip files on the fly). |
Yes, either 1h or 13 or cosy or tocsy |
Sorry for asking one more time, is this apply also on the Bruker ? as i know we could have multiple spectra inside the Bruker |
this will reflect on the shape of the nmrium object that you will get
|
Are we going to assume that the Bruker or JCAMP should include one spectrum, whereas others who use the NMRium have to be sure that loaded file == one experiment? |
No we can not assume this and we need this filter property. |
but can not rely on the and I think this change has to be listed in the migration file |
Sorry if I wasn't clear but Bruker's output (one experiment) often contains FID and FT spectra. |
But this was already done in the proposal I did
Now the problem I see if when we have a zip file containing many jcamp that contain many spectra. We will probably need also a zip filter. |
done by 8aad5c6 |
Currently if the data is coming from the server the only source that we allow in the .nmrium file is jcampURL.
We should make this more general and allow a FileCollection as source.
The text was updated successfully, but these errors were encountered: