# BAD\_muscles annotations in mne-bids-pipeline steps

**URL:** <https://mne.discourse.group/t/bad-muscles-annotations-in-mne-bids-pipeline-steps/11193>\
**Category:** Support & Discussions\
**Tags:** epochs, annotations, mne-bids-pipeline\
**Created:** [May 13, 2025, 10:17am UTC](https://mne.discourse.group/t/bad-muscles-annotations-in-mne-bids-pipeline-steps/11193 "2025-05-13T10:17:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sofia](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/sofia/32/4328_2.png) [@Sofia](https://mne.discourse.group/u/Sofia)\
**Post date:** [May 13, 2025, 10:17am UTC](https://mne.discourse.group/t/bad-muscles-annotations-in-mne-bids-pipeline-steps/11193/1 "2025-05-13T10:17:27Z")

</div>

Hi everyone,  
I am currently using mne-bids-pipeline for MEG data preprocessing. Since I noticed that in my data there are some muscle-related artefacts, I am using the mne function _annotate\_muscle\_zscore_ to mark the bad segments with the _BAD\_muscles_ tag before running the pipeline.  
I was wondering how these annotations are taken into account in the pipeline preprocessing steps:  
1)are they taken into account for the automatic bad channel detection? I was hoping that excluding these bad segments would prevent the automatic rejection of too many channels  
2) are they excluded from the ica compuatation?  
3) when the epochs around the events are created, are those containing some bad\_muscles annotations dropped? For the subject I am currently running it seems to me that the same number of epochs are generated before and after bad\_muscles rejection  
4) if epochs are dropped, how can I access the information about which epochs are rejected due to these artefacts?  
I am not sure that annotating muscle-related periods before running the pipeline is the best practice: do you have any recommendation about how to deal with this problem inside the pipeline instead? I have considered the possibility of the PTP threshold rejection, but this wouldn’t help with the channels rejection step. Moreover, some of the muscle artefacts seem to have high frequency but not very big amplitude, so I’m not sure they will be excluded with this criterion.  
Thank you so much in advance for your help!  
Sofia
