Oxford Nanopore Support
Support
- Home
- Support
- Software
- MinKNOW
- Installation and Setup
- HOW DO I CHANGE THE DIRECTORY FOR THE READS FOLDER
How do I change the directory for the reads folder?
How do I change the directory for the reads folder?
Adjusting the location of the final output files
This does NOT change where temporary and intermediate files are written. This only changes where the final output files (e.g. POD5, FASTQ, BAM) are written.
If you wish to change the directory where you would like only the final output files saved, you can do this within the “Output” settings tab in MinKNOW when starting an experiment, as seen in the picture below.
Notes
Temporary and intermediate files will still be output to the default output location (/data on platform systems, /var/lib/minknow/data on Stand-alone Ubuntu installs)
On Ubuntu systems, suitable permissions must be set on that directory and intermediate directories in order for MinKNOW to be able write to that location. Please refer to the “Directory permissions” section of this document below for more information.
Adjusting the location of all output files
This allows you to change where all files are output, including MinKNOW’s temporary and intermediate files, as well as changing to a different disk.
This can be achieved via two methods, either via the config_editor
tool (method 1, recommended) or by manually editing the user_conf
file (method 2).
Method 1: Using the config_editor
tool (recommended)
From the command-line do:
- Navigate to your installation directory
- Type:
./bin/config_editor --conf user --filename conf/user_conf --set output_dirs.base=<new_location>
Where <new_location>
is the full path of the desired directory.
Method 2: Manually editing user_conf
file
To manually change this location, perform the following steps:
- Navigate to the
user_conf
file
Windows: C:\ProgramFiles\OxfordNanopore\MinKNOW\conf\user_conf
MacOS: /Applications/MinKNOW.app/Contents/Resources/conf/user_conf
Ubuntu: /opt/ont/minknow/conf/user_conf
Near the top, where it says "base", please alter the "value0" file directory to the desired directory, making sure to leave the "" on either side of the directory location.
Leave all other settings untouched, save the file, and restart your computer.
Notes
A restart is required for these changes to take effect.
This new location must be both large enough and performant enough for MinKNOW to write output files as well as temporary and intermediate files. We recommend a minimum 1 TB SSD drive.
On Ubuntu systems, suitable permissions must be set on that directory and intermediate directories in order for MinKNOW to be able write to that location. Please refer to the “Directory permissions” section of this document below for more information.
Directory permissions (Ubuntu systems)
On Ubuntu systems, suitable permissions must be set on the chosen output directory for MinKNOW to be able to write to that location successfully. If insufficient permissions are set, you may be unable to select the desired output directory in the GUI, or may run into errors when MinKNOW tries to write output data.
If you wish to use the directory /data/dir1/dir2
as your output directory, the following commands will set the permissions correctly:
chmod a+rx /data
chmod a+rx /data/dir1
chmod a+rwx /data/dir1/dir2
The above chmod
commands add (+
) the read and write permissions for all users on /data
and /data/dir1
, and add (+
) the read, write, and execute permissions for all users on /data/dir1/dir2.
Further information about directory permissions
For MinKNOW to write to an output directory, it requires the following permissions to be set:
- The MinKNOW user must have read, write, and execute permissions for the final directory (e.g.
/data/dir1/dir2
) - The MinKNOW user must have read and execute permissions for all intermediate directories (e.g.
/data
, and/data/dir1
)
By default directories will usually have read and execute permissions for all users. We can check the permissions on a given directory by using the ls -ld
command. For example:
$ ls -ld
drwxrwxr-x 2 prom prom 4096 May 9 10:10 dir1
This shows the directory has read, write, and execute permissions for the user (in this case prom
), the same rwx
permissions for the group (also prom
), and read, no write (-
), and execute permissions for other users.
Instead of adding permissions for all users, we could add permissions only for the MinKNOW user. This would involve one of:
- Changing the file’s owner to be the MinKNOW user
- Changing the file’s group to be the MinKNOW group
- Making the MinKNOW user a member of the file’s current group
The MinKNOW user is different depending on the system you have. For example, MinKNOW uses the grid
user on GridIONs, the prom
user on PromethIONs, and the minknow
user on Stand-alone installations of MinKNOW (for MinION and P2 Solo).