eth-mds / ricu

🏥 ICU data with R 🏥
https://eth-mds.github.io/ricu/
GNU General Public License v3.0
33 stars 11 forks source link

import_src,'All required tables have already been imported ' #44

Closed anothersin closed 9 months ago

anothersin commented 10 months ago

Hi thanks for the great package!

I want to load the local dataset again, e.g. MIMIC-IV. But when we import_src('miiv', <miiv path>) again after detach('miiv') and unlink(<miiv path>), I found that it doesn't load the data again.

The console output is

> import_src('miiv', './local_data/miiv')
Warning message:
All required tables have already been imported

We appreciate any help you may be able to give.

prockenschaub commented 9 months ago

Importing in ricu means that the data is stored on disk. Since they have been written to disk the first time you called import_src('miiv', <miiv path>), ricu doesn't do so again.

Could you provide a bit more detail on what exactly you want to do?

anothersin commented 9 months ago

Hi, thank you very much for your reply.

We first started thinking ricu could handle MIMIC-IV 2.2, so we import_src('miiv', <miiv 2.2 path>), and found that not all tabels could be imported. Then we found the function setup_src_data('mimic'), which runs successfully, but the code imported MIMIC-IV 1.0. We were trying to reproduce the data preprocessing of this repository YAIB-cohorts. By reading the paper carefully, we found out that they are dealing with MIMIC-IV 2.0. So we executed import_src('miiv', <miiv 2.0 path>) after detach('miiv') and unlink('miiv'), but the following occurs

> import_src('miiv',<miiv 2.0 path>)
Warning message:
All required tables have already been imported
>

The *.csv.gz was also not successfully processed as *.fst.

Actually, the most violent way to handle this situation would be to create a new R environment, but I suppose there are other elegant ways. Please help inform me on how to deal with this if it's convenient.

Importing in ricu means that the data is stored on disk. Since they have been written to disk the first time you called import_src('miiv', <miiv path>), ricu doesn't do so again.

Could you provide a bit more detail on what exactly you want to do?

anothersin commented 9 months ago

Hi, thank you very much for your reply.

We first started thinking ricu could handle MIMIC-IV 2.2, so we import_src('miiv', <miiv 2.2 path>), and found that not all tabels could be imported. Then we found the function setup_src_data('mimic'), which runs successfully, but the code imported MIMIC-IV 1.0. We were trying to reproduce the data preprocessing of this repository YAIB-cohorts. By reading the paper carefully, we found out that they are dealing with MIMIC-IV 2.0. So we executed import_src('miiv', <miiv 2.0 path>) after detach('miiv') and unlink('miiv'), but the following occurs

> import_src('miiv',<miiv 2.0 path>)
Warning message:
All required tables have already been imported
>

The *.csv.gz was also not successfully processed as *.fst.

Actually, the most violent way to handle this situation would be to create a new R environment, but I suppose there are other elegant ways. Please help inform me on how to deal with this if it's convenient.

Importing in ricu means that the data is stored on disk. Since they have been written to disk the first time you called import_src('miiv', <miiv path>), ricu doesn't do so again. Could you provide a bit more detail on what exactly you want to do?

We solved this problem by re-downloading the dataset