Skip to content
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

Error when running HIVPhyloTSI with MAF and PatStats input files #1

Open
cvn001 opened this issue Jun 27, 2024 · 0 comments
Open

Error when running HIVPhyloTSI with MAF and PatStats input files #1

cvn001 opened this issue Jun 27, 2024 · 0 comments

Comments

@cvn001
Copy link

cvn001 commented Jun 27, 2024

Hi,

I encountered an error while running HIVPhyloTSI with my test HIV samples. I used two input files: one MAF result file (
result_MAF.csv) generated from BaseFreq results via Shiver, and one PatStats result file (result_patStats.csv) generated from Phyloscanner.

Here is the error message I received:

Info: Loaded phyloscanner data, shape=(116, 55)
Info: Loaded MAF data, shape=(4, 9672)
Info: Model Features: ['is_mrc' 'gag_lrtt' 'pol_lrtt' 'gp120_lrtt' 'gag_maf3c' 'gp41_maf3c' 'gp41_maf12c' 'gag_tips' 'gp41_tips' 'gp120_tips']
Traceback (most recent call last):
  File "/lvdata/lxc/work/HIV/test/new_test/HIVSeqPipe/hivseq-pipe/docker/tools/HIV-phyloTSI/HIVPhyloTSI.py", line 240, in <module>
    main()
  File "/lvdata/lxc/work/HIV/test/new_test/HIVSeqPipe/hivseq-pipe/docker/tools/HIV-phyloTSI/HIVPhyloTSI.py", line 232, in main
    Xgene_means = generate_features(Xlrtt, Xtips, Xdual, Xmaf, _args.modeldir, modelfeats)
  File "/lvdata/lxc/work/HIV/test/new_test/HIVSeqPipe/hivseq-pipe/docker/tools/HIV-phyloTSI/HIVPhyloTSI.py", line 166, in generate_features
    Xgene_means['{}_lrtt'.format(g)] = Xlrtt.loc[:, eval(g)].mean(axis=1)
  File "/home/lixiangchen/miniconda3/envs/hivphylotsi/lib/python3.6/site-packages/pandas/core/indexing.py", line 1418, in __getitem__
    return self._getitem_tuple(key)
  File "/home/lixiangchen/miniconda3/envs/hivphylotsi/lib/python3.6/site-packages/pandas/core/indexing.py", line 822, in _getitem_tuple
    retval = getattr(retval, self.name)._getitem_axis(key, axis=i)
  File "/home/lixiangchen/miniconda3/envs/hivphylotsi/lib/python3.6/site-packages/pandas/core/indexing.py", line 1839, in _getitem_axis
    return self._getitem_iterable(key, axis=axis)
  File "/home/lixiangchen/miniconda3/envs/hivphylotsi/lib/python3.6/site-packages/pandas/core/indexing.py", line 1133, in _getitem_iterable
    keyarr, indexer = self._get_listlike_indexer(key, axis, raise_missing=False)
  File "/home/lixiangchen/miniconda3/envs/hivphylotsi/lib/python3.6/site-packages/pandas/core/indexing.py", line 1092, in _get_listlike_indexer
    keyarr, indexer, o._get_axis_number(axis), raise_missing=raise_missing
  File "/home/lixiangchen/miniconda3/envs/hivphylotsi/lib/python3.6/site-packages/pandas/core/indexing.py", line 1177, in _validate_read_indexer
    key=key, axis=self.obj._get_axis_name(axis)
KeyError: "None of [Int64Index([ 790,  791,  792,  793,  794,  795,  796,  797,  798,  799,\n            ...\n            2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289],\n           dtype='int64', name='position', length=1500)] are in the [columns]"

It seems there is an issue with the columns not matching during the feature generation step. Could you please help me identify what might be causing this error and how to resolve it?

Thank you for your assistance!

Best regards,

Xiangchen Li

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant