Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to mount my local dir #70

Open
rl4940 opened this issue May 1, 2023 · 4 comments
Open

How to mount my local dir #70

rl4940 opened this issue May 1, 2023 · 4 comments

Comments

@rl4940
Copy link

rl4940 commented May 1, 2023

Hi Nanocdisco team:

Thank you for developing this great tool.
I have a question may be on the side of singularity, that how to mount my dir into the container, in order to use my fast5 files from local computer.

@duceppemo
Copy link

sample=my_sample

# Create writable container
singularity build --sandbox nd_analysis nanodisco.sif

# Create new folders inside writable container to add own data
[ -d /home/bioinfo/nd_analysis/home/nanodisco/dataset/"${sample}"/natif ] || mkdir -p /home/bioinfo/nd_analysis/home/nanodisco/dataset/"${sample}"/natif
[ -d /home/bioinfo/nd_analysis/home/nanodisco/dataset/"${sample}"/wga ] || mkdir -p /home/bioinfo/nd_analysis/home/nanodisco/dataset/"${sample}"/wga

# Start interactive shell and bind own data
singularity run \
    --no-home \
    -B /media/36tb/data/nanopore/native_nano-0007/fast5_basecalled_single_demultiplexed/"${sample}":/home/nanodisco/dataset/"${sample}"/natif:ro \
    -B /media/36tb/data/nanopore/wga_nano-0008/fast5_basecalled_single_demultiplexed/"${sample}":/home/nanodisco/dataset/"${sample}"/wga:ro \
    -B /home/bioinfo/ref:/home/nanodisco/reference \
    -w nd_analysis

# Re-define variable inside container
sample=my_sample

# From within the container
nanodisco preprocess \
    -p 64 \
    -f dataset/"${sample}"/natif  \
    -s "${sample}"_natif \
    -o analysis/"${sample}"/preprocessed_subset \
    -r reference/my_ref.fna

nanodisco preprocess \
    -p 64 \
    -f dataset/"${sample}"/wga \
    -s "${sample}"_wga \
    -o analysis/"${sample}"/preprocessed_subset \
    -r reference/my_ref.fna
# etc.

@touala
Copy link
Member

touala commented Jul 12, 2023

Hello,

Thank you for sharing your solution. This also helped putting back this issue on my radar. I would recommend trying #64 (comment) which do not require to bind volumes to singularity container.

@duceppemo
Copy link

duceppemo commented Jul 12, 2023 via email

@touala
Copy link
Member

touala commented Jul 12, 2023

Ok perfect. The relative path requirement is coming from singularity. There might be ways around it but I always used relative path...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants