dataesr/scientific-paragraphs-categorization huggingface dataset:
1 Hz at the time of data collection (Supplementary Table  1 ). When comparing software implementations, the performance was originally low for the FieldTrip filter in the Oddball dataset (Supplementary Figure  2 ). We realized that the FieldTrip preprocessing function extracts data epochs before filtering the data when provided with both filter settings and epoch information. After consulting with FieldTrip developers, for all analyses using FieldTrip, we used an alternate multi-step implementation allowing us to extract epochs after the raw data had been filtered. We found that the only line noise removal that affected the percentage of significant channels was the interpolation of noisy channels. Notch filtering had no significant effect. Spectral and spatial interpolation in cleanline and Zapline-plus even impacted performance negatively for the Face dataset.
The Go/No-go data likely had a hardware notch filter that proved efficient at removing line noise since removing noisy channels no longer affected performance (Supplementary Table  1 ; Supplementary Figure  3 ). When significant, the performance improvement of line noise correction was minor (on the order of a few percent), in contrast to the effect of high-pass filtering, which led to performance increases of about 50% on two datasets. Except for data visualization and cluster corrections for multiple comparisons in the frequency domain, offline removal of line noise might not be a critical step when preprocessing EEG data. We have found that re-referencing in all three datasets did not increase the percentage of significant channels. At best, the median, average, REST, and PREP references led to a non-significant decrease in performance for some datasets.
Again, this is contrary to belief in the EEG community, where there is a relentless search for the optimal EEG reference  [18] [19] [20]. Our result is surprising, given that the three datasets used different references (Cz for the Go/No-go data, nose for the Face data, and BIOSEMI internal reference for the Oddball data). The nose reference for the Face dataset has been known to introduce artifacts, especially at high frequency  21  , and is now seldom used in EEG research. The BIOSEMI raw signal for the Oddball dataset is considered unsuited for offline data analysis, and the BIOSEMI company recommends choosing an offline reference to add 40 dB extra CMRR (common mode rejection ratio) (https:// www. biose mi. com/ faq/ cms& drl. htm). The Neuroscan Cz reference for the Go/No-go dataset is also a common reference by EGI, Inc.
Nevertheless, re-referencing the data to Cz for the Oddball dataset did not increase performance (Fig. 3 ). These results might indicate a fundamental difference in terms of noise suppression between analog referencing and digital re-referencing and warrant more research to understand the difference between the two. The interaction between data re-referencing and prior data filtering (0. 5 Hz high-pass in our case) should also be investigated. We have observed that, if the data is high-pass filtered at or above 0. 5 Hz, subtracting mean baseline activity should be omitted for event-related analyses. Subtracting baseline activity has either no effect or a negative effect on data quality, especially when the baseline is shorter than 500 ms. Lutz and collaborators argue that filtering distorts ERPs and that baseline removal should be used instead  17.
While it is true that the ERPs are distorted, we have found that, when using the short baseline proposed by Lutz, data quality decreases dramatically, rendering almost all electrodes non-significant for some subjects in the case of the Oddball dataset (Supplementary Figure  11 ). Regarding artifact rejection, our results are not what one would expect of basic (simple thresholding) and more advanced data cleaning methods. Almost none of them led to significant performance improvement, and when improvement was observed, the effect was weak and not consistent across datasets. When resampling 50 data trials instead of using all the trials to compute significance, we observed that rejecting trials led to significant improvement for most methods, meaning that these methods are indeed capable of removing bad trials.
For example, using a 50 data trials bootstrap with ASR, a threshold of 10 increased performance for the Face and Oddball datasets (p < 0. 0001 in both cases), although about 60% to 80% of trials were rejected. Using a 50 data trials bootstrap, Brainstorm sensitivity 5 for high-frequency artifacts provided significant improvements (p < 0. 004 in all datasets with 19% to 45% of trials rejected), and MNE Autoreject also provided significant improvements (Go/No-go: p = 0. 005 and 12% of trials rejected; Oddball: p < 0. 001 and 19% of trials rejected). However, as seen in Table  1 , this was not the case when bootstrapping all remating trials: the removal of bad trials most often failed to compensate for the decrease in the number of trials and associated decrease in statistical power compared to the control condition where no trials were removed.
Although ICA increased the percentage of significant channels, it did not do so systematically (Table  1 ). However, there is more to consider when using an artifact rejection method than the number of significant channels. For example, ICA and ICLabel removed artifacts related to eye and muscle movements, which affect scalp topographies and might provide advantages for visualization (Supplementary Figure  12 ) and subsequent source localization. The EEGLAB pipeline performed best and was a significant improvement compared to filtering the data for all datasets, with 5% (Go/No-go) to 17% (Oddball) and 18% increase in the number of significant channels. This was likely due to the methods used to reject and interpolate bad channels, as both the ICA and the ASR methods showed limited efficacy ("Artifact rejection methods" section).
All other pipelines showed no improvements compared to filtering the data. One could argue that we have a double-dipping problem because we optimized the pipelines, then recalculated the significance. To address this issue, we reverted the EEGLAB pipeline 1 to all default parameters (v2022. 0), which only changed the threshold for channel correlation to 0. 85 instead of 0. 9. The difference with the basic pipeline was no longer significant for the Go/No-go dataset. It was still significant for the Face (p = 0. 004) and the Oddball dataset (p = 0. 0008). We could not include all existing pipelines in our comparison. The PREP pipeline  22  is an EEGLAB plugin for building EEG pipelines. The PREP pipeline contains threshold-based automated EEGLAB artifact rejection 2 , which we chose not to test since we tested similar methods in other software (Brainstorm, FieldTrip).
When using all remaining data trials to compute significance, we checked for saturation of our performance metric, and that not all electrodes were significant. For both the Go/No-go and the Oddball datasets, about half of the subjects reached 80% significant channels with high-passed filtered data. Still, none reached 100%, and even when this value was above 90% (only four such subjects in all datasets), the EEGLAB pipeline could sometimes improve performance. If the percentage of bad data trials for a given condition and a given subject was more than 75% of the total number of trials, we ignored the subject. When comparing methods, significance was not calculated when the number of remaining subjects was less than 4. We rounded all significant effects to the nearest percent. P-values are reported uncorrected, but we do not report any significant p-value above 0.
Data. Data availability. All data is publicly available on the OpenNeuro. org and NEMAR. org web platform under the following public digital object identifiers https:// doi. org/ 10. 18112/ openn euro. ds002 680. v1. 2. 0, https:// doi. org/ 10. 18112/ openn euro. ds002 718. v1. 0. 5, https:// doi. org/ 10. 18112/ openn euro. ds003 061. v1. 1. 1. Go/No-go dataset. This experiment is a go-no visual categorization task where 14 participants responded when they saw an animal in a briefly flashed photograph. Fifty percent of the photographs contained images of animals photographed from different angles, and the other 50% did not contain images of animals or humans. Images were presented animal pictures for 20 ms at random intervals of 1. 8-2. 2 s. We compared correct targets-go responses on animals-to correct distractors-no-go responses on non-animal images  27.
To reduce the amount of data to process, we only used data from one of the two recording sessions (session 1), which amounted to an average of 228 targets (standard deviation: 17 targets) and 235 distractors (standard deviation: 10 distractors). The data was acquired at 1000 Hz and resampled to 250 Hz for subsequent analysis using the MATLAB resample function. Face dataset. This multi-modal dataset  11  contained EEG data acquired by an Elekta MEG machine and has been used in many publications, including the comparison of open-source software packages  28. Eighteen participants judged the symmetry of facial photographs presented sequentially. A fixation cross was presented for a random duration between 400 and 600 ms, after which the stimulus (face or scrambled face) was superimposed for a random duration between 800 and 1,000 ms.
During the 1,700 ms interstimulus interval a central white circle was shown. This task was accessory and was used to maintain participant engagement, as the goal of the experiment was to compare different types of faces: familiar, unfamiliar, and scrambled. Here we compared familiar and scrambled faces. We used a release of this dataset tailored for EEG research, where the six runs for each subject were concatenated, and the data was resampled at 250 Hz  29. Each subject saw 150 familiar and 150 scrambled faces. This dataset contained four non-EEG channels, which we ignored in all analyses. Oddball dataset. In this experiment, 13 participants responded by pressing a button to infrequent oddball sounds (70 ms of 1000 Hz; 15% of the trials) interspaced by frequent standard sounds (70 ms at 500 Hz; 70% of the trials) and infrequent white-noise sounds (70 ms duration; 15% of the trials).
Inter-stimulus interval was selected randomly from 0. 9 to 1. 1 s. Of the three data blocks (or runs) for each subject, only one run is analyzed here to speed up computation. Run 1 is truncated for one of the subjects, so we processed run 2 instead. We only considered correct responses to oddball targets and standard non-targets (behavioral response on oddball stimuli and absence of response on standard stimuli). There was an average of 92 correct targets (standard deviation: 25) and 518 correct non-targets (standard deviation: 8). The data were digitally resampled to 256 Hz before being processed using the BIOSEMI resampling program. This dataset contained 15 auxiliary channels, which were ignored in all analyses, except for the referencing (five of these auxiliary channels are used to re-reference the data in Fig.
5 and no low-pass filter-all other parameters set to defaults). For Brainstorm, we used the process_bandpass function with a FIR high-pass filter at 0. 5, no low pass, and all default parameters (2019 FIR filter version, which is the default). For FieldTrip, we used the default settings for high-pass filtering (4th order Butterworth filter). For FieldTrip, we use the onestep procedure in the ft_preprocessing function, which filters data epochs instead of filtering the raw data and then extracting data epochs ("FieldTrip But epochs" in Supplementary Figure  2 ). Because of poor performance for the Auditory Oddball dataset, and upon contacting the FieldTrip tool developers, we also used a multi-step approach to first filter the data and then extract epochs using the ft_redefinetrial function ("FieldTrip But" in Supplementary Figure  2 ).
We finally used the Zapline-plus (v1. 2. 1) EEGLAB plugin, a method that combines spectral and spatial filtering to remove line noise  14. We used default settings for both cleanline and Zapline-plus for the 50-Hz frequency band. Re-referencing. The auditory Oddball dataset was recorded with additional channels to test re-referencing methods: mastoids, earlobes, and nose. These additional channels are recorded in the auxiliary channels of the BIOSEMI amplifier (EXG 1-5) and are not included in any other analyses. EEGLAB (v2022. 1) pop_reref method was used to reference the data to these channels. We also used the PREP pipeline performReference function (with default parameters), which calculates a robust reference using the RANSAC algorithm  22. We used the EEGLAB pop_reref function and the FieldTrip ft_preproc_rereference function to calculate the average reference with default parameters.
We also used the FieldTrip ft_preproc_rereference function to compute the median reference. For the REST reference  5  and following the FieldTrip tutorial (https:// www. field tript oolbox. org/ examp le/ reref erence/; August 8, 2022), we used the same 10-to 20-template montage (Easycap-M1) for all datasets, and calculated a leadfield matrix for the 4-sphere spherical head model (conductances of 0. 33, 1, 0. 0042, and 0. 3300; radii of 71, 72, 79, and 85 mm). Finally, still using FieldTrip, we calculated the longitudinal and circumferential daisy chain references, which extract a small subset of channels and calculate their pairwise difference.
Automated artifact rejection. EEGLAB clean_rawdata channel rejection. The clean_rawdata EEGLAB plugin (v2. 7) was used for detecting bad channels with correlation thresholds ranging from 0. 15 to 0. 975 (see Table  1 ). All other data rejection methods of clean_rawdata were disabled. Channels below the correlation threshold are interpolated using spherical splines (pop_interp function of EEGLAB 2022. 1). EEGLAB clean_rawdata ASR rejection. The clean_rawdata EEGLAB plugin (v2. 7) was used for detecting bad segments of data with thresholds ranging from 5 to 200 (see Table  1 ). This plugin uses the Artifact Subspace Reconstruction method  5  to detect and correct bad portions of data. We only used the artifact detection method of ASR to remove bad segments of data (which is the default in EEGLAB for offline processing) and did not correct them.
FieldTrip ft_artifact_zvalue artifact parameters. We used the function ft_artifact_zvalue (FieldTrip version of August 7, 2022) to remove artifacts. We followed the online tutorial (https:// www. field tript oolbox. org/ tutor ial/ autom atic_ artif act_ rejec tion/; version of August 8, 2022) and used the code snippets to remove EOG and muscle artifacts. For detecting eye movements, we used frontal channels AF7, AF3, Fp1, Fp2, and Fpz (Oddball dataset), AF3, AF4, AF7, AF8, and Fpz (Face datasets), channels Fp1 and Fp2 (Go/No-go dataset). We left all other parameters as in the tutorial (trlpadding = 0; artpadding = 0. 1; fltpadding = 0; 4th order Butterworth filter and use of the Hilbert method). We used a frequency range of 2 to 15 Hz, as recommended in the FieldTrip tutorial, and varied the z-score threshold from 1 to 6.
For detecting muscle artifacts, we changed the channels to T7, T8, TP7, TP8, P9, and P10 for the Oddball and Face datasets and T5, T6, CB1, and CB2 for the Go/No-go dataset. We used the default 9-order Butterworth filter and boxcar parameter to 0. 2, but changed the frequency range from 100 to 110 Hz (the upper edge of this filter is lower than in the FieldTrip tutorial to accommodate our lower data sampling rate) and varied the z-score threshold from 1 to 6. Note that z-score calculated on a subset of channels are likely more relevant for MEG than for EEG: For EEG, the number of channels with noise might depend on the reference. High frequency noise is also likely stronger in MEG than EEG where it might be smeared out. Brainstorm bad segment detection. We used the Brainstorm (version of August 5, 2022) functionality to detect bad portions of data (menu item "Detect other artifacts" corresponding to the command line function process_ evt_detect_badsegment).
The algorithm was validated on four EEG datasets  31  and has been used with default parameters by at least one other group  32. We followed the online documentation (https:// autor eject. github. io/ stable/ auto_ examp les/ plot_ autor eject_ workfl ow. html; August 8 th 2022) and used, as in the tutorial, 1 to 4 channels to interpolate. Another parameter in the Autoreject tutorial is the number of epochs to fit. The proposed method uses the first 20 epochs to speed up computation. We tried using the first 20 epochs and all epochs (Table  1 ).
Pipelines. Common processing for all pipelines. High-pass filtering at 0. 5 Hz was applied using the default method in each software package (Finite Impulse Response for EEGLAB, MNE, and Brainstorm and Butterworth filter for FieldTrip; see also the Filtering Method section). HP 0. 5 Hz pipeline. We use the default EEGLAB FIR 0. 5-Hz high-pass filter and no other preprocessing. See the Filtering Method section. EEGLAB pipeline. We use the default FIR 0. 5-Hz high-pass filter, followed by electrode line noise detection and interpolation (4 standard deviation threshold; "Artifact rejection methods" section), clean_rawdata channel correlation removal (0. 9 correlation threshold), clean_rawdata ASR rejection (threshold of 20), ICA followed by ICLabel with 0. 9 probability thresholds for muscle and eye.
We modified the core code to decrease the high-pass filter cutoff frequency to 0. 5 Hz (instead of the 1-Hz default) to match the first preprocessing step with other pipelines. We disabled the cleanline plugin to remove line noise because it produced errors on some datasets. We made other minor modifications to be able to process the Go/No-go, Face, and Oddball datasets and issued version 2. 0 of the HAPPE pipeline for others to use (https:// github. com/ arnod elorme/ happe). Unlike other pipelines, this pipeline automatically re-reference the data, which may explain its poor performance in Fig. 5.
Parameter values Visual Go/No-go dataset Face dataset Auditory Oddball dataset EEGLAB EEGLAB clean_rawdata ASR threshold 5, 10, 20, 50, 100, 150, 200 - - - EEGLAB ICLabel probability of eye category thresh-old 0. 5, 0. 6, 0. 7, 0. 8 , 0. 9 0. 5 ( p = 0. 01) - - EEGLAB ICLabel probability of muscle category threshold 0. 5, 0. 6, 0. 7, 0. 8 , 0. 9 - 0. 6 ( p = 0. 008) FieldTrip ft_artifact_zvalue LF z-score threshold 1, 1. 5, 2, 2. 5, 3, 4, 5, 6 - - - FieldTrip ft_artifact_zvalue HF z-score threshold 1, 1. 5, 2, 2. 5, 3, 4, 5, 6 5 (3%; p < 0. 0001) - - Brainstorm bad segments LF sensitivity threshold (1 to 5) 1, 2, 3, 4, 5 5 (28%; p < 0. 002) - - Brainstorm bad segments HF sensitivity threshold (1 to 5) 1, 2, 3, 4, 5 - - - Brainstorm trial thresholding method parameter 200, 400, 600, 1000, 2000, 5000 - - - MNE Autoreject number of trials used for calibration 20 trials (default) & all trials all (12%; p < 0.
A resistance rate to second-line drugs of 5. 7% was obtained using PhyResSE. More precisely, FQ resistance was detected in 5 strains (gyrA gene), capreomycin resistance in one strain (tylA gene) and streptomycin resistance in 8 strains (rpsl in 4 strains and rrs in 4 strains). Lineage determination. All the main lineages described, except for lineage 7, were represented in our dataset (Table  4 ). With both tools, lineage 4 was the most common, followed by lineages 3 and 1. The two tools showed 99. 5% agreement in lineage determination. Only one discrepancy was found as a strain belonging to the Euro-American lineage was identified by PhyResSE, while Mykrobe identified this strain as belonging to the East African Indian lineage (Table  4 ).
The discrepancies between the phenotypic and genotypic methods may depend on the regular updating of the databases used by the two tools as knowledge advances. Due to its cost and performance, WGS is for now insufficient to support its use as an alternative to conventional phenotype-based DST. It should be implemented in specific cases to detect resistance rapidly, in particular for the clinical management of MDR-TB strains, providing considerable information when compared with current routine methods. The phenotypic study of second line anti-TB drugs is not performed easily in routine laboratories and is used mainly by specialized laboratories. Unlike standard phenotypic tests conducted in hospital laboratories, WGS offers the opportunity to determine resistance to second-line anti-TB drugs easily.
Elements may be computer-interfaced, for example, through vendor-provided graphical software or through a custom LabVIEW interface, but not in digital communication with one another. In this approach, a person is responsible for synthesizing data inputs from various elements, and making the appropriate system re-configurations between repetitions (i. e. , laser shots) (see Figure  1 (a) for an illustration). The increase in the repetition rate of high-power laser facilities necessitates a need to move beyond this human interfacing, towards digital interfacing. This leads to the adoption of control methods that are managed primarily in network-interfaced software (which itself is configured by humans) (see Figure  1(b) ). A distributed networked control system  [42]  is one in which the laboratory elements interact between one another (rather than to one central person or even one central control hub), and it is designed to be fault-tolerant and scalable.
This metadata is manually captured and recorded by a human operator, then collected together with the data and labelled in such a way that it can be re-associated with the relevant data. In this approach, when other scientists wish to leverage that data in analysis, people communicate the data and metadata to collaborators via email, shared cloud folders or other means. This approach to data management for high-power laser facilities has relied on sufficient and accurate humandescribed contexts associated with each element of data. However, when lasers are pulsed/fired at many times per hour, less time is available to capture the metadata -and thus, there is more opportunity for mislabelled or missing data. Human error is also an issue in low-repetition-rate experiments, and so automated recording of metadata can benefit even these less-frequent measurements.
However, in the most extreme cases of new high-power laser systems capable of generating terabytes to petabytes of data in a span of days or weeks, it is not even feasible to copy the raw data onto a personal computer, let alone easily distribute it in-full to colleagues. Isolated, fragmented copies of partial datasets could be expected to result from person-to-person distribution. We suggest that organized approaches to data management for the next generation of high-power laser facilities involve people stepping back from direct manipulation and distribution of data. So, we propose approaches to data management with systems that (1) reliably save data with unambiguously associated metadata; (2) provide easy access to the data from multiple users and institutions; and (3) include modular software tools for analysing data.
Despite systems being based on different frameworks, subsystems are partly interfaced to one another, and reusability and uniformity within a subsystem, where possible, is implemented. As an example thereof, the laser-plasma data acquisition (DAQ) is often done with cameras. The software Laser Light Inspector  [47]  provides a common user interface for various camera vendors with a number of live analysis features, and was therefore chosen by HZDR for camera acquisition control. It further provides a centralized interface for remote control of the camera clients. This reduces efforts for, for example, file path configuration, significantly since the vast majority of detectors are operated via this software, which leads to a high level of homogeneity within this subsystem. Likewise, acquired images are always stored locally at each client, like the native vendor software does for other detectors, such as optical spectrometers or oscilloscopes, not being integrated in Laser Light Inspector.