MicrobialDarkMatter / GraphMB

MIT License
34 stars 6 forks source link

OSError: [Errno 9] Bad file descriptor #37

Open harrytchild opened 1 month ago

harrytchild commented 1 month ago

Hi Andre,

I have managed to run GraphMB using CPUs but this took a long time on the large assemblies I have. I had issues running the same installation on the GPU, which I thought I had fixed by changing some of the dependancy versions (see below). However, I have now come across another issue using this installation on the same dataset. Here is the command I have used:

graphmb --assembly metaflye_assemblies/H_U --outdir gpu_test_graphmb_results_H --assembly_name edges_filt.fasta --markers assembly_contig_marker_gene_stats.tsv --graph_file assembly_graph.gfa --depth edge_depth.txt --writebins --cuda

And the error:

/home/harry/miniconda3/envs/graphmb/lib/python3.9/site-packages/graphmb/main.py(570)main() -> if args.writebins: (Pdb) Uncaught exception Traceback (most recent call last): File "/home/harry/miniconda3/envs/graphmb/bin/graphmb", line 8, in sys.exit(main()) File "/home/harry/miniconda3/envs/graphmb/lib/python3.9/site-packages/graphmb/main.py", line 570, in main if args.writebins: File "/home/harry/miniconda3/envs/graphmb/lib/python3.9/site-packages/graphmb/main.py", line 570, in main if args.writebins: File "/home/harry/miniconda3/envs/graphmb/lib/python3.9/bdb.py", line 88, in trace_dispatch return self.dispatch_line(frame) File "/home/harry/miniconda3/envs/graphmb/lib/python3.9/bdb.py", line 112, in dispatch_line self.user_line(frame) File "/home/harry/miniconda3/envs/graphmb/lib/python3.9/pdb.py", line 262, in user_line self.interaction(frame, None) File "/home/harry/miniconda3/envs/graphmb/lib/python3.9/pdb.py", line 357, in interaction self._cmdloop() File "/home/harry/miniconda3/envs/graphmb/lib/python3.9/pdb.py", line 322, in _cmdloop self.cmdloop() File "/home/harry/miniconda3/envs/graphmb/lib/python3.9/cmd.py", line 126, in cmdloop line = input(self.prompt) OSError: [Errno 9] Bad file descriptor

To Reproduce Steps to reproduce the behavior:

  1. Environment used

  2. Type of data Here are the steps to the input data

    • Metaflye assemblies on nanopore data
    • extracted edges
    • marker gene info from running CheckM on edges
    • minimap align reads to edges and use jgi_summarize_bam_contig_depths to extract depth table
  3. How GraphMB was installed mamba create -n graphmb -c conda-forge make cmake libgcc python=3.9 pip tensorflow=2.11.1 numpy=1.23.0 mamba activate graphmb pip install graphmb

  4. Options used See command above

Expected behaviour Here is the log from running GraphMB on the same files with CPU: cpu_graphmb_log.txt

Output messages Here is the log file with the error: gpu_test_graphmb.txt

Cheers in advance for any help you can provide!

Harry

AndreLamurias commented 1 month ago

I noticed that in the CPU run you used the full paths for the output dir (/localdata/harry/MAF024/unsterilised_coassembly_output/bins/M_U/graphmb_results) and in the GPU run you used relative paths: (gpu_test_graphmb_results) I would have to check what's going on with the "writebins" option to break there with relative path, but can you try again with full paths as you did in the CPU run, to make sure that's the issue? Thanks!

harrytchild commented 1 month ago

Hi Andre,

Thanks for getting back to me. I have tried using full paths and this still gave the same error.

Cheers,

Harry

gpu_test_graphmb_full_paths.txt