karel-brinda / MiniPhy

Phylogenetic compression of extremely large genome collections [661k β†˜πŸ­πŸ²π—šπ—Άπ—• | BIGSIdata β†˜πŸ°πŸ΄π—šπ—Άπ—• | AllTheBact'23 β†˜πŸ³πŸ±π—šπ—Άπ—•]
https://brinda.eu/mof
Other
19 stars 0 forks source link

Tree inference – argument list too long: '/bin/sh #101

Closed karel-brinda closed 8 months ago

karel-brinda commented 8 months ago

From @shenwei356:

Morning, Karel, I manually activated the env of attotree and tried the command, it said:

Traceback (most recent call last): 
  File "/hps/nobackup/iqbal/shenwei/2kk/batches.n-00.miniphy/.conda/ce9b7d8ca4029080ad672fb2aa324c3d_/bin/attotree", line 10, in <module> 
    sys.exit(main()) 
             ^^^^^^ 
  File "/hps/nobackup/iqbal/shenwei/2kk/batches.n-00.miniphy/.conda/ce9b7d8ca4029080ad672fb2aa324c3d_/lib/python3.12/site-packages/attotree/attotree.py", line 381, in main 
    attotree(fns=args.genomes, k=args.k, s=args.s, t=args.t, newick_fo=args.o, phylogeny_algorithm=args.f, fof=args.L) 
  File "/hps/nobackup/iqbal/shenwei/2kk/batches.n-00.miniphy/.conda/ce9b7d8ca4029080ad672fb2aa324c3d_/lib/python3.12/site-packages/attotree/attotree.py", line 276, in attotree 
    mash_triangle(fns, phylip1_fn, k=k, s=s, t=t, fof=fof) 
  File "/hps/nobackup/iqbal/shenwei/2kk/batches.n-00.miniphy/.conda/ce9b7d8ca4029080ad672fb2aa324c3d_/lib/python3.12/site-packages/attotree/attotree.py", line 159, in mash_triangle 
    run_safe(cmd, output_fn=phylip_fn) 
  File "/hps/nobackup/iqbal/shenwei/2kk/batches.n-00.miniphy/.conda/ce9b7d8ca4029080ad672fb2aa324c3d_/lib/python3.12/site-packages/attotree/attotree.py", line 109, in run_safe 
    p = subprocess.Popen("/bin/bash -e -o pipefail -c '{}'".format(command_str), shell=True, stdout=out_fo) 
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
  File "/hps/nobackup/iqbal/shenwei/2kk/batches.n-00.miniphy/.conda/ce9b7d8ca4029080ad672fb2aa324c3d_/lib/python3.12/subprocess.py", line 1026, in __init__ 
    self._execute_child(args, executable, preexec_fn, close_fds, 
  File "/hps/nobackup/iqbal/shenwei/2kk/batches.n-00.miniphy/.conda/ce9b7d8ca4029080ad672fb2aa324c3d_/lib/python3.12/subprocess.py", line 1953, in _execute_child 
    raise child_exception_type(errno_num, err_msg, err_filename) 
OSError: [Errno 7] Argument list too long: '/bin/sh

Looks like attotree supports a file list as the input, it might be safer to change the snakemake rule to provide input via a file list.