kfuku52 / amalgkit

RNA-seq data amalgamation for a large-scale evolutionary transcriptomics
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

/bin/sh: 1: bc: not found #99

Closed kfuku52 closed 2 years ago

kfuku52 commented 2 years ago

@Hego-CCTB bc is not available by default for some Linux distributes, so we should avoid it as much as possible. This is doable by replacing $(NUM)/4 with $[$(NUM)/4]. I'll apply the change later.

/bin/sh: 1: bc: not found
Traceback (most recent call last):
  File "/opt/conda/envs/biotools/bin/amalgkit", line 378, in <module>
    args.handler(args)
  File "/opt/conda/envs/biotools/bin/amalgkit", line 89, in command_integrate
    integrate_main(args)
  File "/opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/integrate.py", line 134, in integrate_main
    get_fastq_stats(args)
  File "/opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/integrate.py", line 71, in get_fastq_stats
    total_spots = int(subprocess.check_output(total_spots_command, shell=True))
  File "/opt/conda/envs/biotools/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/opt/conda/envs/biotools/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'echo $(zcat /gfe_data/transcriptome_assembly/fastp_fastq/Asarum_fudsinoiTBG157910/OY_18_2.fastq.gz | wc -l)/4|bc' returned non-zero exit status 127.
kfuku52 commented 2 years ago

The above fix didn't work in my Singularity env.

Traceback (most recent call last):
  File "/opt/conda/envs/biotools/bin/amalgkit", line 378, in <module>
    args.handler(args)
  File "/opt/conda/envs/biotools/bin/amalgkit", line 89, in command_integrate
    integrate_main(args)
  File "/opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/integrate.py", line 129, in integrate_main
    get_fastq_stats(args)
  File "/opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/integrate.py", line 67, in get_fastq_stats
    total_spots = int(subprocess.check_output(total_spots_command, shell=True))
ValueError: invalid literal for int() with base 10: b'$[93204912/4]\n'
kfuku52 commented 2 years ago

all fixed now