bids-standard / bids-specification

Brain Imaging Data Structure (BIDS) Specification
https://bids-specification.readthedocs.io/
Creative Commons Attribution 4.0 International
265 stars 154 forks source link

BEP042 surface electromyography (HDsEMG/EMG) #1371

Open neuromechanist opened 1 year ago

neuromechanist commented 1 year ago

UPDATE April 12, 2024, Important Links for faster access:

Based on the BIDS Extension Proposal Guideline, I want to start the discussion to extend the BIDS to include HDsEMG.

HDsEMG involves recording multiple streams of electrical activity from the skin surface above a muscle or a group of muscles and provides a spatial representation of the muscle activity as seen on the surface (i.e., the skin).

There is a rapidly growing interest in the HDsEMG domain, especially as several blind-source separation techniques can decompose the signal array to motor-unit spike trains.

Source: Pubmed, retrieved 12/08/2022 from a search query including the phrase "high-density electromyography" and "HDsEMG"  

Also, at least three independent and public datasets are available with extensive multi-task and multi-session recordings, but they are not in the BIDS format. See Malešević et al., Sci Data 2019, Matran-Fernandez et al., Sci Data 2019, and Jiang et al., 2021 IEEE TNSRE.

HDsEMG findings closely connect to brain imaging and mobile Brain/Body Imaging by providing insights about muscular activity at the motor-unit level. Also, this modality can become easily integrated into other brain imaging studies as a standalone modality that informs about the efferent pathways or with functional connectivity to the other brain imaging methods. A great tutorial describing the basics of the HDsEMG and its decomposition is available at Del Vecchio, et al., J Electromyogr Kinesiology 2020

On the instrument/hardware side, the sooner the events, data files, and the recording information convert to the BIDS format, the less possibility for error and much greater savings in the researcher’s time. OT Bioelettronica (OTB) and its esteemed technical team, one of the leading companies in manufacturing HDsEMG instruments, expressed their interest in adopting the BIDS standard for single-subject implementation at the recording time. We hope to be able to implement a transparent recording and dataset scheme that starts with data collection.

The motor unit activations, spike trains, and the derived metrics from this information are derivatives of HDsEMG, and are usually computed using blind source separation (BSS) methods such as Convolutive Independent Component Analysis (ICA). However, the HDsEMG BSS process, much like all BSS in the biosignal domain, has many assumptions and requires tuning several hyperparameters. We hope this proposal extend the proposed guidelines in BEP021, Common Electrophysiological Derivatives to HDsEMG, and also provides transparency on the reported and provided BSS results (as reported in the derivative directory) both when the BSS is performed at the data-collection point for a single subject (by the instrument software) and when it is done as a post-processing step by the researcher.

We appreciate your comments and contribution to this potential proposal. We look forward riot hearing from you, and in the coming days, we will also reach out to the authors of the public data to request their help in this effort. If you have any questions, please do not hestiate to conact me, Simone Posella (OTB, @SPosella), or Fabio Bolognesi (OTB, @FabioOT).

FabioOT commented 1 year ago

Good day, all OTB company is really excited for the development of this new EMG format, which can improve the standardization of such a growing sector like EMG research. OT Bioelettronica s.r.l (https://otbioelettronica.it/en/) is involved in this sector from many years, all of our applications span most of the biomedical signals with a dedicated attention for EMG (iEMG, HDsEMG, bipolar EMG) and EEG acquisitions. For this reason the possibility to directly work in a new standard for these types of acquisitions, represents an excellent opportunity that we do not want to miss. Actually me and @SPosella (software developers) are fully immersed in the development of our new main platform for the communication with OTB instruments, the idea is to include the Bids format in the files which can be visualizzed and processed through it (and maybe in the future use it as default format). Although our priority is the release of a new software, we'll do our best to include in the official release of next year, the first prototype structure of Bids format, in this way a lot of new contents will be included for all of our customers, not just a totally fresh new platform to have fun with, but also a new standard format to unify all the researchers under the same "flag". Greetings from all the otb team and happy holidays to all.

sappelhoff commented 1 year ago

Hi @neuromechanist et al.! Nice to hear that you find BIDS valuable and want to implement support for EMG. These are busy days, so I don't expect much to happen until early next year (including a more thorough pass by me and some questions / recommendations). However I can already tell you that you'll be able to reach a much larger audience by cross-posting and advertising this issue on some of our BIDS channels such as

Once we discussed some more (soon), we can also advertise via Twitter/Mastodon and hopefully get more EMG researchers involved. I could very well imagine that there are already some people working with BIDS who also work with EMG, and it'd be valuable to get their input on what's needed in BIDS to become "nice" for EMG.

neuromechanist commented 1 year ago

Thanks @sappelhoff, a lot for the introduction and instructions. Of course. I will cross-post to make sure that the message reaches interested researchers.

Just to clarify, This BEP is not about EMG but about high-density surface EMG (HDsEMG). HDsEMG is recording from a single muscle (or a group of closely positioned muscles) with multiple electrodes (usually 32 or 64) to find the spatial distribution of the electrical activity over the muscle and to potentially recover motor-unit activity using convolutive ICA.

The practice, data collection, sensor placement, analysis, and use cases of HDsEMG can differ considerably from EMG. For example, while EMG is usually collected from multiple sites on the body and is bipolar, HDsEMG is mainly collected from one or two single muscles, and the collection is monopolar (i.e., reference is on the bone).

Also, as much with the EEG ICA, it turns out the decomposing HDsEMG to the motor units provides good accuracy compared to intramuscular EMG (iEMG):

image This is from Del Vecchio 2020, showing successful pickup of the motor units from HDsEMG as compared to iEMG.

I believe that EMG is already included as a part of BIDS-EEG. I think this setup (i.e., EEG and EMG being together) makes sense for the brain-body recordings and makes the analysis straightforward. However, I believe that an extension of BIDS is necessary for pure EMG setups (i.e., not including EEG), biomechanics, physical therapy, and others. Still, this is out of the scope of the current HDsEMG issue 🙈.

Having said that, I am interested in BIDS-EMG, but as you said, I also believe it requires a large-scale collaborative effort from researchers across many disciplines. On the other hand, HDsEMG is rapidly on the rise but is not yet a fully streamlined and widely-used modality. So, it might be just the right time to extend BIDS to HDsEMG.

Happy holidays and see you in 2023!

robertoostenveld commented 1 year ago

Hi Seyed,

Let me shortly chime in here - also to ensure I get notified of new activity on this issue. Thanks for sending the email to the google group, that is what got me here.

I did my PhD research in the group of Dick Stegeman and was involved in some of the HD-sEMG research, for example this, this, and this. I think I still have a decent understanding of HD-sEMG recordings and how the data is analyzed - although I have not kept up to date with more recent work. I also happen to have a good understanding of BIDS and BEPs ;-)

Perhaps you have been contacted by others with interest in a HD-sEMG-BEP. I think it would be good to plan an online meeting to get to know each other and make some initial plans how to tackle this.

best regards, Robert

robertoostenveld commented 1 year ago

Some time ago I already had a go with data2bids to convert an EMG dataset to something that resembles BIDS. See https://www.fieldtriptoolbox.org/example/bids_emg/. Note that that example is conventional EMG, not high-density. I don't know whether I still have some of our own HD-sEMG recordings in my backups/archive. If so, those could be a starting point for a better draft example. If not, I could ask the EMG colleagues with whom I did it back then.

neuromechanist commented 1 year ago

Hi Robert,

Thanks a lot for your input. I actually have an email going out to you and @CPernet this morning (8 am ET) about this BEP. I think I need to revise it now a little 😅.

The papers are super great and helpful, especially regarding the setup and demonstrating how HDsEMG can also help with intricate musucalr structure in the face and neck area; thanks for sharing.

Yes, probably a short startup meeting is needed at this stage. I will share the starting draft and the working group chat here in the next couple of days. I will also reach you and others via email (and also the group chat).

We have access to a good amount of HDsEMG data, including public datasets. But, most (if not all) are from OTB instruments. It would be great if we can also provide datasets from other instruments to ensure the efforts would work on as many files and datasets as possible.

All the best Yahya

CPernet commented 1 year ago

tagging @GiacomoBert from BEP37NIBS for which Shokoofeh and Joona will work on an hdEMG + TMS dataset -- as a general rule, we want as much overlap with any electrophysiology if there is a way to have EMG and hd-EMG that's a plus.

neuromechanist commented 1 year ago

Thanks, @CPernet, for adding potentially interested researchers. I believe having EMG and HDsEMG together, or separately can make a perfect topic for the first workgroup meeting.

neuromechanist commented 1 year ago

Hello back, As promised, here is the ongoing BEP draft that started a while back. We have been drafting two parallel file/folder structures as the aim is to have both per-person structures suitable for saving data files directly after recording and also multi-subject datasets, which is the traditional BIDS data structure: https://docs.google.com/document/d/1G5_Eu2OemcZXS9xOGINPA6SUTaZOml7LBmZCMnUhTXA/edit?usp=sharing

Here is also the BIDS-HDsEMG working group invitation to the Element/Matrix platform. I have just created it, as we need to retire the Slack group and migrate to an open-source and free platform. Hopefully, the members of the Slack channel will join soon as well 😊: https://matrix.to/#/#bids-hdsemg:matrix.org

neuromechanist commented 1 year ago

The call for the first meeting is up now. Please let us know your availability at: https://whenisgood.net/bids-m1 Also, everyone can suggest agenda for the first meeting at the BIDS-HDsEMG at the meeting-minutes room of the workgroup chat.

Looking forward to seeing you there.

neuromechanist commented 1 year ago

Good day everyone,

The inaugural meeting for BIDS-HDsEMG will be on Monday, Jan 30th, 2023, 9 am ET, 3 pm CET.

You can join the meeting using this link: https://ucsd.zoom.us/j/97533232141 You can also find the final agenda (and minutes of the meetings) in Element.

I hope to see you all on Monday.

neuromechanist commented 1 year ago

To provide an update and resume discussion, the first meeting was held on Jan 30th, 2023, and we need to address the following questions:

  1. List the pro and cons of having EMG and hdsEMG in the same BEP (A non-exhaustive list is available at Pros and Cons of having HDsEMG/EMG Google Doc and will be circulated through Element by 4/16 for comment)
  2. List all companies that are explicitly active with HD-EMG in terms of hardware and software a. Hardware: possibly do a random sample from the literature to see which amplifiers are being used (just count them, total 148 papers in 2022 and 2023 (up to May 10th), first 40 sorted by year, 23 used OTB, 4 used TMSi, 1 each Intan, LSiN, Delsys, Available on Instruments used in research for HDsEMG Google Sheet Planned due 4/23) b. Software: mainly custom scripts being used? (Planned, due 4/23)
  3. Can the current BIDS specifications/tools convert the HDsEMG to a BIDS-compatible dataset (a draft of necessary fields to describe HDsEMG that are not covered by other modalities will be circulated via Element by 4/12, and is accessible in this HDsEMG/EMG-specific terms)
  4. Would it be possible to make some example datasets available through https://www.otbioelettronica.it/en/downloads? (Yes, files are available at OTB File Sturcure, an EEG-BIDS sample will be added this week, with a comparative report of which metadata is available but not reported by the OTB converter, due 4/14)

PS: Apologies for the pause in the efforts; an extended sick leave, a major grant submission, and a transcontinental move happened all in this period.

neuromechanist commented 1 year ago

@robertoostenveld kindly converted the sample HDsEMG (and bipolar) EMG datasets to BIDS format which is available in this BIDS folders under mne-tools/mne-bids#1129.

Here are a summary of the contents of each folder under the BIDS folders. I agree that the main issue is to make the data FAIR; otherwise, electrical signals are electrical signals:

BIDS1: Delsys Trigno Mini EMG recordings

The file contains two sensors. Each sensor has one channel EMG (bipolar) and a six-channel IMU. The location of the IMU and the EMG probes are different. Therefore, EMG and IMU (all six together) may need separate metadata regarding their location, orientation, etc. This problem is not present in the normal (non-Mini) sensors. On a separate note, should IMU channels be recorded with EMG?

BIDS2: Delsys Galileo HDsEMG recordings

The file contains recordings of two Galileo sensors. Each Galileo sensor consists of four electrodes in a diamond-shaped arrangement, with an inter-electrode distance (IED) of 5mm. The signals are recorded in monopolar mode, and the reference is at a separate site. Therefore, two sets of locations are required for each Galileo sensor: 1- for the electrodes and 2- for the reference.

BIDS3: g.tec Pangolin

Each Pangolin array has 16 electrodes (there can be up to 64 Pangolins) with IED of 8.6 mm; there can also be one additional electrode to act as a reference. The recordings are monopolar. To report the Pangolin's location, the sensor's position, the sensor, the orientation of the sensor, and the position of the reference electrode are needed.

BIDS4: OTB Sessantaquattro

The file contains a single 64-electrode hd-EMG recording using OTB sessantaquattro. Sessantaquattro is an A/D converter that connects to electrode arrays with different shapes and IEDs. The recording can also be bipolar (either in the longitudinal or transverse direction) or monopolar, with a reference far from the electrode array.

One thing common across all files is a need for grouping the electrodes/channels within an array or sensor. Each system can contain multiple arrays, which can have different features, including location, size, and IED.

Also, several other pieces of information are missing beyond the sensor location/muscle or recording mode (bi/monopolar) and reference. They include the relative position of the electrode to the muscle innervation zone, how the innervation zone is determined, which muscles are covered by the arrays, etc. I'll try to summarize them in the Google Doc under item 3 above.

robertoostenveld commented 1 year ago

Regarding "On a separate note, should IMU channels be recorded with EMG?", I would say yes. That aligns with how we deal with auxiliary channels in MEG, EEG, etc. However, in an XXX dataset (with XXX being MEG, EEG, NIRS, iEEG, EMG) the XXX channels are required. The optional auxiliary channels are to be sampled with the same equipment. If it were data from a different device, it should be stored as its own modality.

robertoostenveld commented 1 year ago

In the case of the Galileo and Pangolin the electrodes have a fixed arrangement, similar to "grids" and "strips" in the iEEG specification.

For the Pangolin I would say that _emg.json would among others contain

{ 
Manufacturer: g.tec,
ManufacturersModelName: g.HIamp,
ElectrodeManufacturer: g.tec,
ElectrodeManufacturersModelName: Pangolin
EMGPlacementScheme: "on the left and right biceps"
EMGElectrodeGroups: "pangolin1: 4x4 grid on the left biceps, pangolin2: 4x4 grid on the right biceps", 
EMGGround: "left elbow",
EMGReference: "right sternum"
}

The identifiers pangolin1 and pangolin2 would also appear in the _channels.tsv.

The anatomical locations might be too imprecise but can be made better (medical/anatomical terminology is not my expertise). This does not specify the orientation yet, I don't directly have an idea for that other than free-text in EMGElectrodeGroups.

robertoostenveld commented 1 year ago

For the 4th example it would be for example with this HD04MM1305

{ 
Manufacturer: OTB ,
ManufacturersModelName: Sessantaquattro,
ElectrodeManufacturer: OTB,
ElectrodeManufacturersModelName: HD04MM1305,
...
}
robertoostenveld commented 1 year ago

For your information, I have updated the examples here on https://drive.google.com/drive/folders/1k-PNBejOYi4JCE8iLxYhQ6R7L1kWuAbD?usp=sharing such that they use the emg directory rather than the beh directory

neuromechanist commented 1 year ago

Thank you @robertoostenveld for adding the EMG-specific fields to the GDrive folder.

Querying hd-sEMG on PubMed for 2022 and 2023 results in 148 papers. After sorting by year and examining 40 of them, 6 did not include EMG data. from the rest 34, 23 studies were done using OTB systems (~68%), 4 using TMSi (12%), 2 using custom amplifiers and grids, and 1 using each of LSiN, Intan, and Delsys systems.

A recent paper lists the potential requirements for hd-sEMG experiment designs, including the parameters that should be taken into account in designing the protocol, sensor placement, reporting, and analysis.

Surprisingly, most studies reported IED and electrode diameter or mentioned the electrode part number. Several also provided their use of EMG problems to find the innervation zones and placement of the sensors.

Here are a couple of points that would need further exploring:

  1. Sensor placement information require several more details than the name of the muscle. Innervation zones are distinctly different from the muscle belly (see the image below (from Barbero 2012), for the innervation zone of Rectus Femoris, which is in the proximal 50% of the muscle, whereas the muscle belly is at 50%). hd-sEMG would be best recorded if it captures the innervation zone, while the bipolar sMEG is recorded at the muscle belly (according to SENIAM). image

  2. Using the strip and grids from BIDS-iEEG is very helpful, but I should note the inherent anatomical variability of the cortex and limbs. Even at the skull and scalp level, the head circumference variability (max-min)/mean is ~14% for adult males (FAA report, 1993), while the for arm circumference variability is 72% for typical young male adults (Rostamzadeh, BMC Pediatric 2021). So, merely describing the electrode locations would not be sufficient to understand which muscles and what area of the muscle are covered by an hd-sEMG array. We should consider that muscle size and composition change significantly with training and even when comparing dominant and non-dominant limbs. The grid/organ size ratio is an important consideration.

  3. In this context, the bids-standard/bids-specification#1488 is very timely. We need conventions to define reference frames and coordinate systems to determine sensor placement and the area covered by the sensor wrt the organ for FAIR hd-sEMG datasets.

  4. Custom electrode arrays are particularly challenging to report and reproduce but provide the opportunity for accounting for organ size differences (e.g., an athlete or an obese person, see Ershad, PNAS Nexus 2022) or for recording intricate muscles such as neck and face muscles (see Leung, Laryngoscope 2023, and Chen, TNSRE 2023). We will likely see more of these types of research and data in the near future and should be able to define a standard that facilitates reproducible results.

  5. I also have added a Google Doc for the pros and cons of having EMG and hd-sEMG together in one BEP. Overall, it boils into how many/much details each modality would require to include to present a ~FAIR dataset.

Remi-Gau commented 2 months ago

Had a quick look at this issue and the google doc.

Maybe I am wrong but it seems that having a single BEP for sEMG and hdsEMG still makes sense.

I suspect both methods would still share a lot common points in terms metadata, auxiliary files... And that filenames could still make it explicit which methods was used.

robertoostenveld commented 2 months ago

@agramfort recently showed interest in this, so he might want to chime in.

agramfort commented 2 months ago

Indeed. I think it will be great to have a standard way of sharing / organizing sEMG data. Meta CTLR team should soon open source large datasets and using bids is to me the best way of doing it. I am currently consulting a few people to see what is the best course of action. Please reach out to me if you want to push this effort forward.

neuromechanist commented 2 months ago

Thanks, @Remi-Gau, for looking into the BEP proposal (and for the earlier chat at the BIDS maintainers meeting).

Yes, the suffix (modality) still can be different while the data type is the same (suffix: _sEMG, _hdsEMG, data type: emg, BIDS Common Principles). This could also work for intramuscular/fine-wire EMG (_iEMG (i for intramuscular or invasive)) (see this recent paper as an example) (Note: 80-20 BIDS development rule).

One critical metadata difference between HDsEMG and EMG is the sensor placement. @JuliusWelzel, @sjeung, and I are converging, after almost a year, on a draft standard for sensor placement that would work very well for this purpose.

@agramfort, yes, please. We want to push this forward, Thanks. I will also reach out to some academic contributors for potential interest.

neuromechanist commented 2 months ago

In the BEP Google Doc, we originally had this idea of single-subject datasets/tar files that manufacturer stakeholders can use to generate their data (we called it HDsEMG .BIDS file structure).

During my conversation with @yarikoptic, it turns out that this is pretty much inline with an issue in BIDS 2.0 development:

So, it might be best to separate the efforts, dedicate this BEP to EMG-BIDS, and later work on the small-dataset BIDS structure. I edited the issue title accordingly and am more than happy to remove the related parts from the BEP Google Doc. I appreciate your comments.


Edit 4/14: BIDS file structure is removed from EMG-BIDS BEP.

agramfort commented 2 months ago

@neuromechanist I am arriving a bit late in the conversation. I will start with a few naive question to see where we are.

neuromechanist commented 2 months ago

@agramfort, it is still early. Given that the formats and metadata structure for human electrophysiology, the EMG-BIDS BEP has a huge headstart. Yet, the EMG community is very diverse and passionate about EMG-specific phenomena and potential solutions (for example, cross-talk and using single or double differential sensors to avoid it, See Koh 1993)

What existing file formats are currently being considered for EMG

Definitely EDF/BDF (16-bit, 24bit). Bioelecttronica seems to have potential since (1) It is open source, and (2) ~70% of the HDsEMG data is being done with their instruments. I think a major issue is major EMG non-opensource formats, namely Delsys and Noraxon.

What is the main motivation for having different modalities for EMG and hdEMG?

One advantage is potentially faster convergence; engaging sEMG, HDsEMG, and iEMG communities might be a significant undertaking. Still, with the recent convo with BIDS maintainers, we'll work toward integrating the modalities and inviting different communities to provide input.

What we are missing is channel definitions for EMG sensor locations.

Sensor locations are a major concern for FAIR EMG data distribution (as it is for BIDS-Motion). The EEG logic for electrode location is pretty good. We are extending a similar format for surface anatomy with the BIDS-Motion Devs. However, there are several other metadata needed for EMG as well. I tried to summarize the currently missing metadata in the Necassary Terms Google Doc

robertoostenveld commented 2 months ago

@agramfort you may be interested in following the discussion in #197 regarding file formats for tabular data, including physio and stim.

dorahermes commented 2 months ago

@bids-maintenance Can you perhaps comment on the status/checks needed to proceed. Seems like a group of people is getting excited to move this forward?

Whether hdEMG and EMG should be in the same file or separate files/formats can then be flushed out in more detail.

Remi-Gau commented 2 months ago

@dorahermes Just discussed today at the maintainers meeting and this is likely gonna get an official BEP number.

neuromechanist commented 3 weeks ago

While it is a little belated, happy to announce that the EMG-BIDS BEP is now officially BEP-042 🎉.