WeiWei060512 / NUMTs-detection

Detecting NUMTs from WGS
11 stars 2 forks source link

ValueError: could not broadcast input array from shape (0,22) into shape (0) #11

Open jingydz opened 8 months ago

jingydz commented 8 months ago

Hi, thank you for developing this pipeline for detecting NUMT.

I met an error when I running the first step of NUMT_detection.sh. In some region,

503A 2 /xxx/NUMT/output/NUMTs_and_Breakpoints_detection/503A/503A.mt.disc.sam /xxx/NUMT/output/NUMTs_and_Breakpoints_detection/503A/503A.mt.split.sam /xxx/503A/503A.Mdup.realigned.recal.bam chr10 18434087 18435382 Loaded 3217346917 letters in 3366 sequences Searched 1441 bases in 10 sequences /xxx/NUMT/searchBreakpoint_fromblatoutputs.py:64: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy df_nu['pointGroup'] = df_nu.apply(f_nu, axis=1) Traceback (most recent call last): File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/pandas/core/common.py", line 399, in _asarray_tuplesafe result[:] = values ValueError: could not broadcast input array from shape (0,22) into shape (0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/pandas/core/frame.py", line 2564, in _ensure_valid_index value = Series(value) File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/pandas/core/series.py", line 264, in init raise_cast_failure=True) File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/pandas/core/series.py", line 3236, in _sanitize_array subarr = _asarray_tuplesafe(data, dtype=dtype) File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/pandas/core/common.py", line 402, in _asarray_tuplesafe result[:] = [tuple(x) for x in values] ValueError: cannot copy sequence with size 22 to array axis with dimension 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/xxx/NUMT/searchBreakpoint_fromblatoutputs.py", line 65, in df_mt['pointGroup'] = df_mt.apply(f_mt, axis=1) File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/pandas/core/frame.py", line 2519, in setitem self._set_item(key, value) File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/pandas/core/frame.py", line 2584, in _set_item self._ensure_valid_index(value) File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/pandas/core/frame.py", line 2566, in _ensure_valid_index raise ValueError('Cannot set a frame with no defined index ' ValueError: Cannot set a frame with no defined index and a value that cannot be converted to a Series