-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError: "None of [Int64Index ... in wgdi -c #43
Comments
The problem with your gff and lens file processing is that the location of a certain gene is likely to exceed the scope of the chromosome. |
You can upload your dataset and I can check it for you. |
Dear @SunPengChuan Ptrichocarpa_input_file.zip And the Phytozome files: Ptrichocarpa_533_v4.1.cds_primaryTranscriptOnly.fa.gz |
In a GFF file, the fourth column, which represents the start of each chromosome, always begins with the number 1. |
Hi @SunPengChuan zcat $genome.gff3.gz | awk '{if ($3 == "gene" ) print $1,$4,$5,$7,$9}' | cut -f 1 -d";" | sort -V | sed 's#.#_#g' | sed 's#v4_1##g' | awk '{split($5, a, "[=.]"); if (last != $1) {counter = 1; last = $1} else {counter++} print $1 " " a[2] " " $2 " " $3 " " $4 " " counter " ID" a[2]}' |
I am getting the similar error while running BlockInfo.
Can you check the files attached? |
collinearity = SG_A_vs_SB_B.list savefile = block information (*.csv) |
Hi there,
I'm facing the error below when running the "wgdi -c " command
I'm using Ptrichocarpa from Phytozome
blockinfo = Ptrichocarpa_Ptrichocarpa.blockinfo.csv
lens1 = Ptrichocarpa.lens
lens2 = Ptrichocarpa.lens
tandem = false
tandem_length = 200
pvalue = 0.2
block_length = 5
tandem_ratio = 0.5
multiple = 1
homo = -1,1
savefile = Ptrichocarpa_Ptrichocarpa.blockinfo.new.csv
Traceback (most recent call last):
File "/home/amvarani/.local/bin/wgdi", line 8, in
sys.exit(main())
File "/home/amvarani/.local/lib/python3.10/site-packages/wgdi/run.py", line 163, in main
module_to_run(arg, value)
File "/home/amvarani/.local/lib/python3.10/site-packages/wgdi/run.py", line 122, in module_to_run
run_subprogram(program, conf, name)
File "/home/amvarani/.local/lib/python3.10/site-packages/wgdi/run.py", line 87, in run_subprogram
r.run()
File "/home/amvarani/.local/lib/python3.10/site-packages/wgdi/block_correspondence.py", line 47, in run
arr = self.collinearity_region(cor, bkinfo, lens1)
File "/home/amvarani/.local/lib/python3.10/site-packages/wgdi/block_correspondence.py", line 70, in collinearity_region
df1[[int(k) for k in b1]] += 1
File "/home/amvarani/.local/lib/python3.10/site-packages/pandas/core/series.py", line 1007, in getitem
return self._get_with(key)
File "/home/amvarani/.local/lib/python3.10/site-packages/pandas/core/series.py", line 1042, in _get_with
return self.loc[key]
File "/home/amvarani/.local/lib/python3.10/site-packages/pandas/core/indexing.py", line 1073, in getitem
return self._getitem_axis(maybe_callable, axis=axis)
File "/home/amvarani/.local/lib/python3.10/site-packages/pandas/core/indexing.py", line 1301, in _getitem_axis
return self._getitem_iterable(key, axis=axis)
File "/home/amvarani/.local/lib/python3.10/site-packages/pandas/core/indexing.py", line 1239, in _getitem_iterable
keyarr, indexer = self._get_listlike_indexer(key, axis)
File "/home/amvarani/.local/lib/python3.10/site-packages/pandas/core/indexing.py", line 1432, in _get_listlike_indexer
keyarr, indexer = ax._get_indexer_strict(key, axis_name)
File "/home/amvarani/.local/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 6113, in _get_indexer_strict
self._raise_if_missing(keyarr, indexer, axis_name)
File "/home/amvarani/.local/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 6173, in _raise_if_missing
raise KeyError(f"None of [{key}] are in the [{axis_name}]")
KeyError: "None of [Int64Index([8462, 8465, 8469, 8477, 8481, 8484, 8502, 8503, 8508, 8517, 8520,\n 8534, 8537, 8541, 8545, 8551, 8554, 8558, 8572, 8585, 8591],\n dtype='int64')] are in the [index]"
The text was updated successfully, but these errors were encountered: