shah-in-boots / EGM

Evaluation of electrophysiological signals
https://shah-in-boots.github.io/EGM/
Other
0 stars 1 forks source link

Not calling or finding WFDB on Windows #24

Closed ssandu2 closed 4 months ago

ssandu2 commented 10 months ago

Reported by @ssandu2 - ot clear if reproducible

Error in setnames(x, value) : 
  Can't assign 1 names to a 0 column data.table
In addition: Warning messages:
1: In find_wfdb_command("rdsamp") :
  Cannot find 'rdsamp' in 'wsl -e /usr/local/bin'
2: In (if (.Platform$OS.type == "unix") system else shell)(paste0("(",  :
  '(Cannot find 'rdsamp' in 'wsl -e /usr/local/bin' -r 44 -v) > C:\Users\shsan\AppData\Local\Temp\RtmpK2hucW\file6a9444073298' execution failed with error code 1
3: In data.table::fread(cmd = cmd) :
  File 'C:\Users\shsan\AppData\Local\Temp\RtmpK2hucW\file6a9444073298' has size 0. Returning a NULL data.table.
shah-in-boots commented 10 months ago

Can you please list the session information on instance of R that you were running?

On Fri, Dec 1, 2023, 4:02 PM ssandu2 @.***> wrote:

Error in setnames(x, value) : Can't assign 1 names to a 0 column data.table In addition: Warning messages: 1: In find_wfdb_command("rdsamp") : Cannot find 'rdsamp' in 'wsl -e /usr/local/bin' 2: In (if (.Platform$OS.type == "unix") system else shell)(paste0("(", : '(Cannot find 'rdsamp' in 'wsl -e /usr/local/bin' -r 44 -v) > C:\Users\shsan\AppData\Local\Temp\RtmpK2hucW\file6a9444073298' execution failed with error code 1 3: In data.table::fread(cmd = cmd) : File 'C:\Users\shsan\AppData\Local\Temp\RtmpK2hucW\file6a9444073298' has size 0. Returning a NULL data.table.

— Reply to this email directly, view it on GitHub https://github.com/asshah4/shiva/issues/24, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUI4UIH5J7MHK3EV6NH2RDYHJHWHAVCNFSM6AAAAABADOPQM6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGAZDCNRUGMZTENA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ssandu2 commented 10 months ago

R version 4.3.1 (2023-06-16 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 11 x64 (build 22621)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.utf8 [2] LC_CTYPE=English_United States.utf8 [3] LC_MONETARY=English_United States.utf8 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.utf8

time zone: America/Chicago tzcode source: internal

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] fs_1.6.3 yardstick_1.2.0 workflowsets_1.0.1 workflows_1.1.3 [5] tune_1.1.2 rsample_1.2.0 recipes_1.0.8 parsnip_1.1.1 [9] modeldata_1.2.0 infer_1.0.5 dials_1.2.0 scales_1.2.1 [13] broom_1.0.5 tidymodels_1.1.1 lubridate_1.9.3 forcats_1.0.0 [17] stringr_1.5.0 dplyr_1.1.3 purrr_1.0.2 readr_2.1.4 [21] tidyr_1.3.0 tibble_3.2.1 ggplot2_3.4.4 tidyverse_2.0.0 [25] tfdatasets_2.9.0 tensorflow_2.14.0 reticulate_1.34.0 shiva_0.0.0.9000 [29] keras_2.13.0 vctrs_0.6.3

loaded via a namespace (and not attached): [1] tidyselect_1.2.0 timeDate_4022.108 digest_0.6.33 [4] rpart_4.1.19 timechange_0.2.0 lifecycle_1.0.3 [7] survival_3.5-5 magrittr_2.0.3 compiler_4.3.1 [10] rlang_1.1.1 tools_4.3.1 utf8_1.2.3 [13] data.table_1.14.8 xml2_1.3.5 DiceDesign_1.9 [16] withr_2.5.2 nnet_7.3-19 grid_4.3.1 [19] fansi_1.0.5 colorspace_2.1-0 future_1.33.0 [22] globals_0.16.2 iterators_1.0.14 MASS_7.3-60 [25] zeallot_0.1.0 cli_3.6.1 generics_0.1.3 [28] rstudioapi_0.15.0 future.apply_1.11.0 tzdb_0.4.0 [31] tfruns_1.5.1 splines_4.3.1 parallel_4.3.1 [34] base64enc_0.1-3 hardhat_1.3.0 Matrix_1.6-1.1 [37] jsonlite_1.8.7 hms_1.1.3 listenv_0.9.0 [40] foreach_1.5.2 gower_1.0.1 glue_1.6.2 [43] parallelly_1.36.0 codetools_0.2-19 stringi_1.7.12 [46] gtable_0.3.4 munsell_0.5.0 GPfit_1.0-8 [49] pillar_1.9.0 furrr_0.3.1 ipred_0.9-14 [52] lava_1.7.2.1 R6_2.5.1 lhs_1.1.6 [55] lattice_0.21-8 png_0.1-8 backports_1.4.1 [58] class_7.3-22 Rcpp_1.0.11 prodlim_2023.08.28 [61] checkmate_2.2.0 whisker_0.4.1 pkgconfig_2.0.3

On Fri, Dec 1, 2023 at 4:50 PM Anish Sanjay Shah @.***> wrote:

Can you please list the session information on instance of R that you were running?

On Fri, Dec 1, 2023, 4:02 PM ssandu2 @.***> wrote:

Error in setnames(x, value) : Can't assign 1 names to a 0 column data.table In addition: Warning messages: 1: In find_wfdb_command("rdsamp") : Cannot find 'rdsamp' in 'wsl -e /usr/local/bin' 2: In (if (.Platform$OS.type == "unix") system else shell)(paste0("(", : '(Cannot find 'rdsamp' in 'wsl -e /usr/local/bin' -r 44 -v) > C:\Users\shsan\AppData\Local\Temp\RtmpK2hucW\file6a9444073298' execution failed with error code 1 3: In data.table::fread(cmd = cmd) : File 'C:\Users\shsan\AppData\Local\Temp\RtmpK2hucW\file6a9444073298' has size 0. Returning a NULL data.table.

— Reply to this email directly, view it on GitHub https://github.com/asshah4/shiva/issues/24, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABUI4UIH5J7MHK3EV6NH2RDYHJHWHAVCNFSM6AAAAABADOPQM6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGAZDCNRUGMZTENA>

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fasshah4%2Fshiva%2Fissues%2F24%23issuecomment-1836882122&data=05%7C01%7Cssandu2%40groute.uic.edu%7Ce193f379ac5a455bbf0408dbf2bfe752%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C638370678269766482%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=rnDvW1AV5LN91jkRiAIlihqmDADPs2Ia6GaeBPFFFrI%3D&reserved=0, or unsubscribe https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FBBNDSHRPJZG4OGA7QNHPOWDYHJNK7AVCNFSM6AAAAABADOPQM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZWHA4DEMJSGI&data=05%7C01%7Cssandu2%40groute.uic.edu%7Ce193f379ac5a455bbf0408dbf2bfe752%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C638370678269922727%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=qTVwVa4%2F4sb9fE70Xv4X6NY1ZTfPoity6d8hEigWJq4%3D&reserved=0 . You are receiving this because you authored the thread.Message ID: @.***>

Version          : 5.1.22621.2506 InstanceId       : 7b5ea366-db89-48f3-a607-a845800936a9 UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface CurrentCulture   : en-US CurrentUICulture : en-US PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy DebuggerEnabled  : True IsRunspacePushed : False Runspace         : System.Management.Automation.Runspaces.LocalRunspace

WindowsBuildLabEx                                       : 22621.1.amd64fre.ni_release.220506-1250 WindowsCurrentVersion                                   : 6.3 WindowsEditionId                                        : Professional WindowsInstallationType                                 : Client WindowsInstallDateFromRegistry                          : 4/27/2023 10:19:38 AM WindowsProductId                                        : 00330-51169-50490-AAOEM WindowsProductName                                      : Windows 10 Pro WindowsRegisteredOrganization                           : WindowsRegisteredOwner                                  : Windows User WindowsSystemRoot                                       : C:\WINDOWS WindowsVersion                                          : 2009 OSDisplayVersion                                        : 22H2 BiosCharacteristics                                     : {7, 9, 11, 12...}   

shah-in-boots commented 10 months ago

Issue appears to be related to package startup issues. Will need to evaluate how R on windows conducts package start up, and there may be updates in using system commands.

ssandu2 commented 10 months ago

Thanks for the info. I checked to see if wfdb is installed, and I can see all the files from wfdb-10.6.2 in /usr/local. The whereis command on ubuntu returned the same location for rdsamp you tried to change the wfdb path to in R, so I'm also stuck on where to go from here.

Shashank

On Sat, Dec 2, 2023 at 1:26 PM Anish Sanjay Shah @.***> wrote:

Issue appears to be related to package startup issues. Will need to evaluate how R on windows conducts package start up, and there may be updates in using system commands.

  • Use a Windows instance of R to evaluate path evaluation
  • Check installation status of WFDB software
  • Assess terminal or system call methods from R

— Reply to this email directly, view it on GitHub https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fasshah4%2Fshiva%2Fissues%2F24%23issuecomment-1837234812&data=05%7C01%7Cssandu2%40groute.uic.edu%7Cf986271b9a664471918408dbf36c9e81%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C638371420079690707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=U6tBiEU8oSagQmejyhRZOIVxfBi0sFeQx8Vsj06Ewmg%3D&reserved=0, or unsubscribe https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FBBNDSHRA74AGQUCOKQRS4QTYHN6HHAVCNFSM6AAAAABADOPQM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZXGIZTIOBRGI&data=05%7C01%7Cssandu2%40groute.uic.edu%7Cf986271b9a664471918408dbf36c9e81%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C638371420079690707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=kt5pBxUh5rNYAhLWnjMgscT2VsXOKz3r1WrEsEsyajQ%3D&reserved=0 . You are receiving this because you authored the thread.Message ID: @.***>

shah-in-boots commented 10 months ago

Thanks - I think I've figured out where the issue may be. I essentially need to spin-up a Windows computer (or borrow a computer) and implement a change. Its a file system and primary terminal issue, and I have to sort out why the command is not matching.

Anish

On 12.03.2023 21:38, ssandu2 wrote:

Thanks for the info. I checked to see if wfdb is installed, and I can see all the files from wfdb-10.6.2 in /usr/local. The whereis command on ubuntu returned the same location for rdsamp you tried to change the wfdb path to in R, so I'm also stuck on where to go from here.

Shashank

On Sat, Dec 2, 2023 at 1:26 PM Anish Sanjay Shah @.***> wrote:

Issue appears to be related to package startup issues. Will need to evaluate how R on windows conducts package start up, and there may be updates in using system commands.

  • Use a Windows instance of R to evaluate path evaluation
  • Check installation status of WFDB software
  • Assess terminal or system call methods from R

— Reply to this email directly, view it on GitHub https://nam04.safelinks.protection.outlook.com/?url= https%3A%2F%2Fgithub.com%2Fasshah4%2Fshiva%2Fissues%2F24%23issuecomment-1837234812 &data= 05%7C01%7Cssandu2%40groute.uic.edu%7Cf986271b9a664471918408dbf36c9e81%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C638371420079690707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C &sdata=U6tBiEU8oSagQmejyhRZOIVxfBi0sFeQx8Vsj06Ewmg%3D&reserved=0, or unsubscribe https://nam04.safelinks.protection.outlook.com/?url= https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FBBNDSHRA74AGQUCOKQRS4QTYHN6HHAVCNFSM6AAAAABADOPQM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZXGIZTIOBRGI &data= 05%7C01%7Cssandu2%40groute.uic.edu%7Cf986271b9a664471918408dbf36c9e81%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C638371420079690707%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C &sdata=kt5pBxUh5rNYAhLWnjMgscT2VsXOKz3r1WrEsEsyajQ%3D&reserved=0 . You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were assigned.*Message ID: <asshah4/shiva/ @.***>

--

Anish Shah

dsean2112 commented 10 months ago

Windows PowerShell version:

PSVersion 5.1.22621.2506 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.22621.2506 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1

shah-in-boots commented 10 months ago

Can we check if this works now? @dsean2112 and @ssandu2 ?

I've adjusted in the most recent commit an acceptable workaround for file system issues. The WFDB path finding commands were not suited for evaluating WSL-based directories from a Windows root, thus erroring even though the C-based WFDB program worked without issue on manual, CLI-based testing.

dsean2112 commented 10 months ago

Looks like I'm getting a similar error:

'Cannot' is not recognized as an internal or external command, operable program or batch file. Error in setnames(x, value) : Can't assign 1 names to a 0 column data.table In addition: Warning messages: 1: In find_wfdb_command("rdsamp", wfdb_path) : Cannot find 'rdsamp' in 'wsl /usr/local/bin' 2: In (if (.Platform$OS.type == "unix") system else shell)(paste0("(", : '(Cannot find 'rdsamp' in 'wsl /usr/local/bin' -r 44 -v) > C:\Users\darre\AppData\Local\Temp\RtmpK2jc3v\file845c6ec012b0' execution failed with error code 1 3: In data.table::fread(cmd = cmd) : File 'C:\Users\darre\AppData\Local\Temp\RtmpK2jc3v\file845c6ec012b0' has size 0. Returning a NULL data.table.

shah-in-boots commented 10 months ago

Okay. I will have to look again at this. It may be system dependent on how WSL directory is being structured. If you can bare to trouble shoot further, I would appreciate it. I've narrowed it down to an issue with how the system() commands are interacting or how the WSL directory is being recognized.

Please attempt the following:

Let me know! I appreciate your help in this. I'd like if this software was a bit more universal. @ssandu2 @dsean2112

ssandu2 commented 10 months ago

1-2. Reran the code and got the following error:

Error in setnames(x, value) : Can't assign 1 names to a 0 column data.table In addition: Warning messages: 1: In find_wfdb_command("rdsamp") : Cannot find 'rdsamp' in 'wsl -e /usr/local/bin' 2: In (if (.Platform$OS.type == "unix") system else shell)(paste0("(", : '(Cannot find 'rdsamp' in 'wsl -e /usr/local/bin' -r 44 -v) > C:\Users\shsan\AppData\Local\Temp\Rtmpc10nkK\file8a60481c17b6' execution failed with error code 1 3: In data.table::fread(cmd = cmd) : File 'C:\Users\shsan\AppData\Local\Temp\Rtmpc10nkK\file8a60481c17b6' has size 0. Returning a NULL data.table.

  1. Full Path:

Microsoft.PowerShell.Core\FileSystem::\wsl$\Ubuntu

  1. Full Path:

Microsoft.PowerShell.Core\FileSystem::\wsl.localhost\Ubuntu

On Tue, Dec 5, 2023 at 8:43 PM Anish S. Shah @.***> wrote:

Okay. I will have to look again at this. It may be system dependent on how WSL directory is being structured. If you can bare to trouble shoot further, I would appreciate it. I've narrowed it down to an issue with how the system() commands are interacting or how the WSL directory is being recognized.

Please attempt the following:

  • When looking at global options within R studio, under the "Terminal" section, change the default terminal to PowerShell
  • I've adjusted the code further to allow for differences in how WSL can be recognized. Can you attempt to re-run the code as above?
  • In powershell, the command cd \wsl$\Ubuntu\' should take you to the appropriate linux file structure. Type in pwd` and report back what the full path is.
  • Do this again, but use the command cd \wsl.localhost\Ubuntu\' followed by pwd` and share the full path.

Let me know! I appreciate your help in this. I'd like if this software was a bit more universal. @ssandu2 https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fssandu2&data=05%7C02%7Cssandu2%40groute.uic.edu%7C3fb885396a9f4086515908dbf6052217%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C638374274129945329%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=e1n%2BSqJ2DUBGmjOX05ymorbLH7Yqpz2OewjlbKZNszU%3D&reserved=0 @dsean2112 https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdsean2112&data=05%7C02%7Cssandu2%40groute.uic.edu%7C3fb885396a9f4086515908dbf6052217%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C638374274129945329%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=e53heG%2BP2ToNggDMKp9Z9m0TeZNDjIiUpS3jse8%2B%2F%2Fc%3D&reserved=0

— Reply to this email directly, view it on GitHub https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fasshah4%2Fshiva%2Fissues%2F24%23issuecomment-1841995140&data=05%7C02%7Cssandu2%40groute.uic.edu%7C3fb885396a9f4086515908dbf6052217%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C638374274130101594%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2BuDCq80Bqbc%2FNawNp28%2BoudVbK%2FNOONwlhjp0T29Idw%3D&reserved=0, or unsubscribe https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FBBNDSHU7LLAXXAJZYLALQ2LYH7LVFAVCNFSM6AAAAABADOPQM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBRHE4TKMJUGA&data=05%7C02%7Cssandu2%40groute.uic.edu%7C3fb885396a9f4086515908dbf6052217%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C638374274130101594%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=JD5Kl9pwuURUk2rhySqQxY1mZOXeYlKWt0CcQcAejFc%3D&reserved=0 . You are receiving this because you were mentioned.Message ID: @.***>

shah-in-boots commented 9 months ago

Please try the following:

# Setup
devtools::install_github('asshah4/shiva')
library(shiva)
filePath <- system.file('extdata', package = 'shiva')

# Reading in an ECG
ecg <- read_wfdb('muse-sinus', record_dir = filePath, annotator = 'ecgpuwave')
ecg
class(ecg)

# Visualize the ECG
ggm(ecg)

# Read in the annotation data
ann <- read_annotation('muse-sinus', record_dir = filePath, annotator = 'ecgpuwave')
head(ann)

@ssandu2 @dsean2112

If this works - please respond and I'll close the issue.

ssandu2 commented 9 months ago

This worked for me.

dsean2112 commented 9 months ago

I am receiving the following error when running read_wfdb():

Error: [UNKNOWN] Failed to stat '//wsl.localhost/Ubuntu/usr/local/bin': unknown error

I do not have Ubuntu at the moment but can install it if needed.


From: Anish S. Shah @.> Sent: Monday, December 11, 2023 8:57 AM To: asshah4/shiva @.> Cc: dsean2112 @.>; Mention @.> Subject: Re: [asshah4/shiva] Not calling or finding WFDB on Windows (Issue #24)

Please try the following:

Setup

devtools::install_github('asshah4/shiva') library(shiva) filePath <- system.file('extdata', package = 'shiva')

Reading in an ECG

ecg <- read_wfdb('muse-sinus', record_dir = filePath, annotator = 'ecgpuwave') ecg class(ecg)

Visualize the ECG

ggm(ecg)

Read in the annotation data

ann <- read_annotation('muse-sinus', record_dir = filePath, annotator = 'ecgpuwave') head(ann)

@ssandu2https://github.com/ssandu2 @dsean2112https://github.com/dsean2112

If this works - please respond and I'll close the issue.

— Reply to this email directly, view it on GitHubhttps://github.com/asshah4/shiva/issues/24#issuecomment-1850245648, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BEOPRWUQHS3A3LVKNWV2FUDYI4NNPAVCNFSM6AAAAABADOPQM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJQGI2DKNRUHA. You are receiving this because you were mentioned.Message ID: @.***>

dsean2112 commented 9 months ago

Looks like an error in the find_wfdb_command.

If I bypass this, and simply output "cmd", I later run into the error in the read_annotation function line 127: data.table::fread(cmd = cmd, header = FALSE) Error: Warning messages: 1: In (if (.Platform$OS.type == "unix") system else shell)(paste0("(", : '(wsl /usr/local/bin/rdann -r muse-sinus -a ecgpuwave -e) > C:\Users\darre\AppData\Local\Temp\RtmpYJEGxY\file9f542f57ef2' execution failed with error code 1 2: In data.table::fread(cmd = cmd, header = FALSE) : Stopped early on line 9. Expected 11 fields but found 11. Consider fill=TRUE and comment.char=. First discarded non-empty line: <<>>

shah-in-boots commented 9 months ago

Eureka! I figured it out, I'll send a patch to fix this issue probably tomorrow or Thursday.

Can you list the path for your cygwin binary folder (e.g. command for where your WFDB software was installed)?

On Tue, Dec 12, 2023, 6:59 PM dsean2112 @.***> wrote:

Looks like an error in the find_wfdb_command.

If I bypass this, and simply output "cmd", I later run into the error in the read_annotation function line 127: data.table::fread(cmd = cmd, header = FALSE) Error: Warning messages: 1: In (if (.Platform$OS.type == "unix") system else shell)(paste0("(", : '(wsl /usr/local/bin/rdann -r muse-sinus -a ecgpuwave -e) > C:\Users\darre\AppData\Local\Temp\RtmpYJEGxY\file9f542f57ef2' execution failed with error code 1 2: In data.table::fread(cmd = cmd, header = FALSE) : Stopped early on line 9. Expected 11 fields but found 11. Consider fill=TRUE and comment.char=. First discarded non-empty line: <<>>

— Reply to this email directly, view it on GitHub https://github.com/asshah4/shiva/issues/24#issuecomment-1853099732, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUI4UPRWO54SVHEI4MFYGDYJD4YTAVCNFSM6AAAAABADOPQM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJTGA4TSNZTGI . You are receiving this because you modified the open/close state.Message ID: @.***>

dsean2112 commented 9 months ago

Awesome!

Here's the path: C:\cygwin64\bin


From: Anish S. Shah @.> Sent: Tuesday, December 12, 2023 7:12 PM To: asshah4/shiva @.> Cc: dsean2112 @.>; Mention @.> Subject: Re: [asshah4/shiva] Not calling or finding WFDB on Windows (Issue #24)

Eureka! I figured it out, I'll send a patch to fix this issue probably tomorrow or Thursday.

Can you list the path for your cygwin binary folder (e.g. command for where your WFDB software was installed)?

On Tue, Dec 12, 2023, 6:59 PM dsean2112 @.***> wrote:

Looks like an error in the find_wfdb_command.

If I bypass this, and simply output "cmd", I later run into the error in the read_annotation function line 127: data.table::fread(cmd = cmd, header = FALSE) Error: Warning messages: 1: In (if (.Platform$OS.type == "unix") system else shell)(paste0("(", : '(wsl /usr/local/bin/rdann -r muse-sinus -a ecgpuwave -e) > C:\Users\darre\AppData\Local\Temp\RtmpYJEGxY\file9f542f57ef2' execution failed with error code 1 2: In data.table::fread(cmd = cmd, header = FALSE) : Stopped early on line 9. Expected 11 fields but found 11. Consider fill=TRUE and comment.char=. First discarded non-empty line: <<>>

— Reply to this email directly, view it on GitHub https://github.com/asshah4/shiva/issues/24#issuecomment-1853099732, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUI4UPRWO54SVHEI4MFYGDYJD4YTAVCNFSM6AAAAABADOPQM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJTGA4TSNZTGI . You are receiving this because you modified the open/close state.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/asshah4/shiva/issues/24#issuecomment-1853108699, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BEOPRWQFLEEMH7RFOKLWSYLYJD6GLAVCNFSM6AAAAABADOPQM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJTGEYDQNRZHE. You are receiving this because you were mentioned.Message ID: @.***>

dsean2112 commented 9 months ago

Sorry please disregard the last path.

Here is the correct path: C:\cygwin64\usr\local


From: Darren Seaney @.> Sent: Tuesday, December 12, 2023 9:00 PM To: asshah4/shiva @.> Subject: Re: [asshah4/shiva] Not calling or finding WFDB on Windows (Issue #24)

Awesome!

Here's the path: C:\cygwin64\bin


From: Anish S. Shah @.> Sent: Tuesday, December 12, 2023 7:12 PM To: asshah4/shiva @.> Cc: dsean2112 @.>; Mention @.> Subject: Re: [asshah4/shiva] Not calling or finding WFDB on Windows (Issue #24)

Eureka! I figured it out, I'll send a patch to fix this issue probably tomorrow or Thursday.

Can you list the path for your cygwin binary folder (e.g. command for where your WFDB software was installed)?

On Tue, Dec 12, 2023, 6:59 PM dsean2112 @.***> wrote:

Looks like an error in the find_wfdb_command.

If I bypass this, and simply output "cmd", I later run into the error in the read_annotation function line 127: data.table::fread(cmd = cmd, header = FALSE) Error: Warning messages: 1: In (if (.Platform$OS.type == "unix") system else shell)(paste0("(", : '(wsl /usr/local/bin/rdann -r muse-sinus -a ecgpuwave -e) > C:\Users\darre\AppData\Local\Temp\RtmpYJEGxY\file9f542f57ef2' execution failed with error code 1 2: In data.table::fread(cmd = cmd, header = FALSE) : Stopped early on line 9. Expected 11 fields but found 11. Consider fill=TRUE and comment.char=. First discarded non-empty line: <<>>

— Reply to this email directly, view it on GitHub https://github.com/asshah4/shiva/issues/24#issuecomment-1853099732, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUI4UPRWO54SVHEI4MFYGDYJD4YTAVCNFSM6AAAAABADOPQM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJTGA4TSNZTGI . You are receiving this because you modified the open/close state.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/asshah4/shiva/issues/24#issuecomment-1853108699, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BEOPRWQFLEEMH7RFOKLWSYLYJD6GLAVCNFSM6AAAAABADOPQM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJTGEYDQNRZHE. You are receiving this because you were mentioned.Message ID: @.***>

shah-in-boots commented 9 months ago

@dsean2112

Okay - please try re-installing and seeing if it works.

Also, if there is an error, please try the following.

# XXX represents the path to your WFDB install
options(wfdb_path = 'XXX')

That is supposed to be the first work around, but I may have resolved it by broadening hte base paths to include Cygwin.

dsean2112 commented 9 months ago

I installed wsl and the wfdb commands now appear under usr/local/bin, so that's great. sudo install seemed to do the trick.

After running: ecg <- read_wfdb('muse-sinus', record_dir = filePath, annotator = 'ecgpuwave') on R, I am receiving the same error: 'Cannot' is not recognized as an internal or external command, operable program or batch file Error in setnames(x, value) : Can't assign 1 names to a 0 column data.table In addition: Warning messages: 1: In (if (.Platform$OS.type == "unix") system else shell)(paste0("(", : '(//wsl.localhost/Ubuntu/usr/local/bin/rdsamp -r muse-sinus -v) > C:\Users\darre\AppData\Local\Temp\RtmpOsRX9W\file3b385865550c' execution failed with error code 1 2: In data.table::fread(cmd = cmd) : File 'C:\Users\darre\AppData\Local\Temp\RtmpOsRX9W\file3b385865550c' has size 0. Returning a NULL data.table.

It seems to be an issue with the path. If I run them line by line, I first define the wfdb_path as: //wsl$/Ubuntu/usr/local/bin or //wsl.localhost/Ubuntu/usr/local/bin

Then I'm able to run read_signal() and read_header(). I then run into issues with read_annotator(), with the error message seen above.

dsean2112 commented 9 months ago

If I do not define the wfdb_path via: wfdb_path = options(wfdb_path = '//wsl.localhost/Ubuntu/usr/local/bin')

I receive the error: '//wsl.localhost/Ubuntu/usr/local/bin/rdsamp' is not recognized as an internal or external command, operable program or batch file. Error in setnames(x, value) : Can't assign 1 names to a 0 column data.table In addition: Warning messages: 1: In (if (.Platform$OS.type == "unix") system else shell)(paste0("(", : '(//wsl.localhost/Ubuntu/usr/local/bin/rdsamp -r muse-sinus -v) > C:\Users\darre\AppData\Local\Temp\RtmpOURdPm\file6ef0ce1608' execution failed with error code 1 2: In data.table::fread(cmd = cmd) : File 'C:\Users\darre\AppData\Local\Temp\RtmpOURdPm\file6ef0ce1608' has size 0. Returning a NULL data.table.

dsean2112 commented 9 months ago

If I run read_annotation() line by line, it worked once, and output the annotation_table.

I tried it again and it is stuck on line 127 of the read_annotation function: withr::with_dir(new = wd, code = { dat <- data.table::fread(cmd = cmd, header = FALSE) })

with the error: '//wsl.localhost/Ubuntu/usr/local/bin/rdann' is not recognized as an internal or external command, operable program or batch file. Warning messages: 1: In (if (.Platform$OS.type == "unix") system else shell)(paste0("(", : '(//wsl.localhost/Ubuntu/usr/local/bin/rdann -r muse-sinus -a ecgpuwave -e) > C:\Users\darre\AppData\Local\Temp\RtmpyMqbdH\file60d48a642a' execution failed with error code 1 2: In data.table::fread(cmd = cmd, header = FALSE) : File 'C:\Users\darre\AppData\Local\Temp\RtmpyMqbdH\file60d48a642a' has size 0. Returning a NULL data.table.

When viewing in WSL, rdann is present in usr/local/bin

shah-in-boots commented 9 months ago

I see the issue. The path that you're using is not an executable, its being read as a file.

What happens when...

option('wfdb_path') <- 'wsl /usr/local/bin'

On 12.20.2023 15:26, dsean2112 wrote:

If I run read_annotation() line by line, it worked once, and output the annotation_table.

I tried it again and it is stuck on line 127 of the read_annotation function: withr::with_dir(new = wd, code = { dat <-

              data.table::fread(cmd = cmd, header = FALSE)

})

with the error: '//wsl.localhost/Ubuntu/usr/local/bin/rdann' is not recognized as an internal or external command, operable program or batch file. Warning messages: 1: In (if (.Platform$OS.type == "unix") system else shell)(paste0("(", : '(//wsl.localhost/Ubuntu/usr/local/bin/rdann -r muse-sinus -a ecgpuwave -e) > C:\Users\darre\AppData\Local\Temp\RtmpyMqbdH\file60d48a642a' execution failed with error code 1 2: In data.table::fread(cmd = cmd, header = FALSE) : File 'C:\Users\darre\AppData\Local\Temp\RtmpyMqbdH\file60d48a642a' has size 0. Returning a NULL data.table.

When viewing in WSL, rdann is present in usr/local/bin

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.*Message ID: @.***>

--

Anish Shah

dsean2112 commented 9 months ago

I am receiving the following error: Error in option("wfdb_path") <- "wsl /usr/local/bin" : target of assignment expands to non-language object

I received the same thing when using options()

shah-in-boots commented 9 months ago

Thanks for the update. Let me review why this would be occurring. I'm going to spin-up a windows shell computer to see the issues.

On 12.20.2023 18:10, dsean2112 wrote:

I am receiving the following error: Error in option("wfdb_path") <- "wsl /usr/local/bin" : target of assignment expands to non-language object

I received the same thing when using options()

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.*Message ID: @.***>

--

Anish Shah

dsean2112 commented 9 months ago

Cool thank you. I verified I was able to navigate to wsl$/Ubuntu/usr/local/bin in R, however I noticed I do not have execute permissions for the contained files when viewing in R.

When I view usr/local/bin in wsl, I have read write execute for all users

shah-in-boots commented 9 months ago

The most recent update to the software does two things - branches out the windows safety checks to a developmental branch and removes safety checks from the main version.

shah-in-boots commented 4 months ago

@dsean2112 and @ssandu2

What does options("wfdb_path") look like for you using the most RECENT version of this software?

The installation code is: devtools::install_github("shah-in-boots/EGM") from R directly.

If there is an issue, please feel free to revert to an older version. I'm aiming to publish this and want to include the correct path recommendations/examples in the guide.

dsean2112 commented 4 months ago

After updating and running options("wfdb_path") prior to setting the path, I receive:

NULL

After setting the path, I receive:

[1] "wsl /usr/local/bin"

Let me know if you want me to try something different.

Darren


From: Anish S. Shah @.> Sent: Friday, May 10, 2024 5:17 PM To: shah-in-boots/EGM @.> Cc: dsean2112 @.>; Mention @.> Subject: Re: [shah-in-boots/EGM] Not calling or finding WFDB on Windows (Issue #24)

@dsean2112https://github.com/dsean2112 and @ssandu2https://github.com/ssandu2

What does options("wfdb_path") look like for you using the most RECENT version of this software?

The installation code is: devtools::install_github("shah-in-boots/EGM") from R directly.

If there is an issue, please feel free to revert to an older version. I'm aiming to publish this and want to include the correct path recommendations/examples in the guide.

— Reply to this email directly, view it on GitHubhttps://github.com/shah-in-boots/EGM/issues/24#issuecomment-2105336289, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BEOPRWQFJM3ZUVOHPIY6OXLZBVBQVAVCNFSM6AAAAABADOPQM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBVGMZTMMRYHE. You are receiving this because you were mentioned.

shah-in-boots commented 4 months ago

The software runs for you? Something like read_wfdb() pulls in signal okay?

If so, all is well.

dsean2112 commented 4 months ago

read_wfdb() runs without issue, and the output header, annotations and signal look accurate.

ssandu2 commented 4 months ago

It looks fine on my end as well. The download took a little while (2 min) and I had to set the path. read_wfdb() looks good.

On Sun, May 12, 2024 at 10:33 AM dsean2112 @.***> wrote:

read_wfdb() runs without issue, and the output header, annotations and signal look accurate.

— Reply to this email directly, view it on GitHub https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fshah-in-boots%2FEGM%2Fissues%2F24%23issuecomment-2106292158&data=05%7C02%7Cssandu2%40groute.uic.edu%7C9bc27e6e17494bb98cb508dc7298e582%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C638511248210971961%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=kZ4MY6ahsbNNuQNRuEi%2BToE2RDcbpqKSh1gLF7xnvTo%3D&reserved=0, or unsubscribe https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FBBNDSHSYJDH5IG6AX3U736TZB6DVFAVCNFSM6AAAAABADOPQM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBWGI4TEMJVHA&data=05%7C02%7Cssandu2%40groute.uic.edu%7C9bc27e6e17494bb98cb508dc7298e582%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C638511248210971961%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=XRNVJQplkWrqKNSmUfJdM5h7zM2zAOfnpj4k2EoNFH0%3D&reserved=0 . You are receiving this because you were mentioned.Message ID: @.***>

shah-in-boots commented 4 months ago

Fantastic. Thank you for the input. Will like release v0.1.0 after a bit more documentation.