etal / cnvkit

Copy number variant detection from targeted DNA sequencing
http://cnvkit.readthedocs.org
Other
501 stars 162 forks source link

TypeError: batch_run_sample() takes from 16 to 17 positional arguments but 18 were given #862

Closed nash5202 closed 2 months ago

nash5202 commented 6 months ago

I am trying to run the CNVkit 0.9.11.dev0 copy number calling pipeline for a whole exome sequencing sample. However, I am encountering a type error TypeError:batch_run_sample() takes from 16 to 17 positional arguments but 18 were given. I am using the following options with the batch command:

cnvkit.py batch tumour.bam -n -t xgen_plus_spikein.GRCh38.bed -f hg38_masked.fa --annotate hg38.refGene.filtered.bed -p 1

The pipeline runs until the following step and then fails:

CNVkit 0.9.11.dev0
Detected file format: bed
Splitting large targets
Applying annotations as target names
Detected file format: bed
Wrote ./xgen_plus_spikein.GRCh38.target.bed with 243938 regions
Wrote ./xgen_plus_spikein.GRCh38.antitarget.bed with 39443 regions
Building a flat reference...
Detected file format: bed
Detected file format: bed
Calculating GC and RepeatMasker content in hg38_masked.fa ...
Extracting sequences from chromosome chr1
Extracting sequences from chromosome chr2
Extracting sequences from chromosome chr3
Extracting sequences from chromosome chr4
Extracting sequences from chromosome chr5
Extracting sequences from chromosome chr6
Extracting sequences from chromosome chr7
Extracting sequences from chromosome chr8
Extracting sequences from chromosome chr9
Extracting sequences from chromosome chr10
Extracting sequences from chromosome chr11
Extracting sequences from chromosome chr12
Extracting sequences from chromosome chr13
Extracting sequences from chromosome chr14
Extracting sequences from chromosome chr15
Extracting sequences from chromosome chr16
Extracting sequences from chromosome chr17
Extracting sequences from chromosome chr18
Extracting sequences from chromosome chr19
Extracting sequences from chromosome chr20
Extracting sequences from chromosome chr21
Extracting sequences from chromosome chr22
Extracting sequences from chromosome chrX
Extracting sequences from chromosome chrY
Wrote ./reference.cnn with 283381 regions
Running 1 samples in serial
Traceback (most recent call last):
  File "/anaconda3/bin/cnvkit.py", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/cnvkit/cnvlib/cnvkit.py", line 10, in main
    args.func(args)
  File "/cnvkit/cnvlib/commands.py", line 205, in _cmd_batch
    pool.submit(
  File "/cnvkit/cnvlib/parallel.py", line 18, in submit
    return SerialFuture(func(*args))
                        ^^^^^^^^^^^
TypeError: batch_run_sample() takes from 16 to 17 positional arguments but 18 were given

Any help on resolving this issue is highly appreciated. Thank you.

taoziyu97 commented 6 months ago

We faced the same issue, which seemed to be version-related. Installing version 0.9.10 resolved the problem for me. Do not use CNVkit 0.9.11.dev0.