etal / cnvkit

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

Autobin #802

Open EmMaKaa opened 1 year ago

EmMaKaa commented 1 year ago

Hi,

I have previously run CNVkit on default bin sizes, but now I'd like to try how using autobin affects the results. I have paired tumor-normal samples sequenced with hybrid capture method, am I supposed to use all of them as input for autobin, or only either tumor or normal samples? I understand that only the file with median file size is used for optimal bin size estimation, but obviously the set of files given as input affects the estimation. Another problem I have is that when I tested the command with either tumor or normal samples, it worked for tumor samples but for normal samples it gave an error:

Detected file format: bed Detected file format: bed Estimated read length 130.0 Wrote /tmp/tmpvncrgu42.bed with 100 regions Limiting est. bin size 3250849 to given max. 500000 Splitting large targets Traceback (most recent call last): File "/miniconda3/bin/cnvkit.py", line 10, in sys.exit(main()) File "/miniconda3/lib/python3.9/site-packages/cnvlib/cnvkit.py", line 10, in main args.func(args) File "/miniconda3/lib/python3.9/site-packages/cnvlib/commands.py", line 568, in _cmd_autobin target_out_arr = target.do_target( File "/miniconda3/lib/python3.9/site-packages/cnvlib/target.py", line 18, in do_target tgt_arr = tgt_arr.subdivide(avg_size, 0) File "/miniconda3/lib/python3.9/site-packages/skgenome/gary.py", line 689, in subdivide return self.as_dataframe(subdivide(self.data, avg_size, min_size, verbose)) File "/miniconda3/lib/python3.9/site-packages/skgenome/subdivide.py", line 18, in subdivide return pd.DataFrame.from_records( File "/miniconda3/lib/python3.9/site-packages/pandas/core/frame.py", line 2297, in from_records first_row = next(data) File "/miniconda3/lib/python3.9/site-packages/skgenome/subdivide.py", line 44, in _split_targets nbins = int(round(span / avg_size)) or 1 TypeError: unsupported operand type(s) for /: 'int' and 'NoneType'

Any tips how to solve this? The error confuses me since the bam files for tumor and normal have been generated similarly and I haven't had previous problems with the normal files.