MIT-LCP / MIT-LCP/physionet

Missing files for MIMIC3wdb

Open
#109 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
82
Forks
21
Avg merge
35m
Merged PRs (30d)
1

Description

Thanks for your work matching the MIMIC-III clinical database with the MIMIC-III Waveform Database. I ran into this issue loading the following record:

record = wfdb.rdrecord('p017488-2153-10-19-16-24', 
                        pb_dir = 'mimic3wdb/matched/p01/p017488')

HTTPError: 404 Client Error: Not Found for url: 
http://physionet.org/physiobank/database/mimic3wdb/matched/p01/p017488/3783537_10000.hea

I believe there are missing files in the subject's folder: https://physionet.org/physiobank/database/mimic3wdb/matched/p01/p017488/, specifically these files:

3783537_10000
...
3783537_13933

To fix this, I downloaded the specific files from 'mimic3wdb':

# The files to download
hea_file_list = ['37/3783537/3783537_{}.hea'.format(i) for i in range(10000, 13933+1)]
dat_file_list = ['37/3783537/3783537_{}.dat'.format(i) for i in range(10000, 13933+1)]
file_list = hea_file_list + dat_file_list

# Make a temporary download directory in your current working directory
cwd = os.getcwd()
dl_dir = os.path.join(cwd, 'tmp_dl_dir')

# Download the listed files
wfdb.dl_files('mimic3wdb', dl_dir, file_list)

I placed the files with the other files for mimic3wdb/matched/p01/p017488 because I downloaded the matched database, and the record was read successfully!

(I referenced this demo for guidance -- thanks for putting this together!)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by checking the MIMIC3wdb matched directory for subject p017488 and compare it with the source record path 37/3783537. Verify that files 3783537_10000 through 3783537_13933 are available in both .hea and .dat forms, then confirm that wfdb.rdrecord('p017488-2153-10-19-16-24', pb_dir='mimic3wdb/matched/p01/p017488') loads successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.