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

A problem when use CNV-SIM through docker #10

Open
ranneal opened this issue May 30, 2020 · 1 comment
Open

A problem when use CNV-SIM through docker #10

ranneal opened this issue May 30, 2020 · 1 comment

Comments

@ranneal
Copy link

ranneal commented May 30, 2020

Dear Dr.Hosny,
I am a postgraduate student, and I was doing the CNV simulation work recently. I found that your package may help me a lot.
What I want to simulate is one genome. However, when I followed your suggestion and run the command in docker, an error occurred which said cannot find my reference file. The command and error are posted below:

(base) ran@ran-HP-EliteBook-850-G3:~/Documents/Grace$ sudo docker run -v /home/ran/Documents/Grace/main_project/data nabavilab/cnv-sim ./cnv-sim.py -o /home/ran/Documents/Grace/main_project/data/simulation_output genome /home/ran/Documents/Grace/main_project/data/human_g1k_v37.fasta
[sudo] password for ran:
Traceback (most recent call last):
File "./cnv-sim.py", line 103, in
main()
File "./cnv-sim.py", line 65, in main
args = parser.parse_args()
File "/usr/lib/python2.7/argparse.py", line 1690, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/usr/lib/python2.7/argparse.py", line 1722, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/usr/lib/python2.7/argparse.py", line 1931, in _parse_known_args
stop_index = consume_positionals(start_index)
File "/usr/lib/python2.7/argparse.py", line 1887, in consume_positionals
take_action(action, args)
File "/usr/lib/python2.7/argparse.py", line 1780, in take_action
argument_values = self._get_values(action, argument_strings)
File "/usr/lib/python2.7/argparse.py", line 2220, in _get_values
value = self._get_value(action, arg_string)
File "/usr/lib/python2.7/argparse.py", line 2249, in _get_value
result = type_func(arg_string)
IOError: [Errno 2] No such file or directory: '/home/ran/Documents/Grace/main_project/data/human_g1k_v37.fasta'

I have changed different reference fasta files and the location of the reference file, but it still occurred again and again.Could you please give me some suggestions about how to fix the issue and get a success simulation result?
Thanks a lot!
Looking forward to your reply.

@abdelrahmanhosny
Copy link
Contributor

Hello @ranneal
Thanks for trying out the tool. I think there is a missing part in the docker run command. Specifically, you are missing the path inside the container to mount the data to. So, the command should be:

sudo docker run -v /home/ran/Documents/Grace/main_project/data:/data nabavilab/cnv-sim ./cnv-sim.py -o /data/simulation_output genome /data/human_g1k_v37.fasta

Assuming that the .fasta file is currently under /home/ran/Documents/Grace/main_project/data on your local machine. What this command does is that it maps this directory to a directory inside the docker container at /data. Then, everything should be referenced from /data afterwords.

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

2 participants