You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the Example Walkthrough, when I get to the purge command, I noticed that the file paths I’m supposed to provide in the .txt file should be as if my current working directory were the BIDS dataset. Instead, the walkthrough suggests to write the absolute paths of the files. I realized this simply by adding printing statements where the parsing of the .txt file took place (cubids.py script, line 735). I noticed that the path to the BIDS directory was being automatically appended to the provided file paths. Therefore I realized the right path to provide would be relative to the BIDS directory; the appending of the BIDS directory file happens also if you provide an absolute path.
Additional details
CuBIDS version: 1.1.1 (git cloned latest version as of November 25th)
Datalad version: 1.1.4
What were you trying to do?
I was trying to run the purge command by providing a .txt file containing the paths of the files I wanted to remove from my dataset
What did you expect to happen?
I expected the program to read the .txt file and remove those files I specified in it
What actually happened?
It couldn't locate the files, raising an error claiming they didn't exist. As explained in the summary, this issue could be flagged as 'incorrect documentation'.
Reproducing the bug
This is the first version of the .txt file, where I wrote the paths according to the tutorial on the documentation, namely from outside of the BIDS directory:
Are you referring to this section of the Example Walkthrough? If so, the path in the example is an absolute path, not a relative path from outside the BIDS directory like you have in your bug reproduction. We can make the documentation more explicit about this.
Hi Taylor,
I failed to mention that I did try it with an absolute path as well, but it still wouldn't work. As far as I understood by looking at the source code, the (absolute) path of the BIDS directory (/home/x_gabde/test1612/BIDS_Dataset_Datalad) is being automatically appended to the provided file paths in the txt file, whether absolute path or relative. This was confirmed by some debugging printing statements that I added myself to make sure. Given this, I realized the right path to provide would be the one relative to the BIDS directory.
I tried this again today, to be sure, after git cloning the latest version. From the screenshot below, when I run cubids purge ... in the first line with the no_ped.txt file containing the absolute path, the first printing statement shows me that the path to my BIDS dataset has been added at the beginning of the string I provided. The following line is a printing statement that is supposed to truncate all paths to intendedfor reference format, as I read in the commented lines (cubids.py, from line 744). However, the intendedfor format should include the sub-* directory, which it doesn't in my case. Lastly, as the log line says, it didn't run any association removals.
After I modified the no_ped.txt file with the path relative to the BIDS directory, the cubids purge command worked perfectly and removed the scans and all associated data.
Summary
Following the Example Walkthrough, when I get to the purge command, I noticed that the file paths I’m supposed to provide in the .txt file should be as if my current working directory were the BIDS dataset. Instead, the walkthrough suggests to write the absolute paths of the files. I realized this simply by adding printing statements where the parsing of the .txt file took place (cubids.py script, line 735). I noticed that the path to the BIDS directory was being automatically appended to the provided file paths. Therefore I realized the right path to provide would be relative to the BIDS directory; the appending of the BIDS directory file happens also if you provide an absolute path.
Additional details
What were you trying to do?
I was trying to run the purge command by providing a .txt file containing the paths of the files I wanted to remove from my dataset
What did you expect to happen?
I expected the program to read the .txt file and remove those files I specified in it
What actually happened?
It couldn't locate the files, raising an error claiming they didn't exist. As explained in the summary, this issue could be flagged as 'incorrect documentation'.
Reproducing the bug
This is the first version of the .txt file, where I wrote the paths according to the tutorial on the documentation, namely from outside of the BIDS directory:
When I edited the path(s) as if my current directory were the BIDS dataset, the purge command ran successfully:
The text was updated successfully, but these errors were encountered: