Merck / Merck/deepbgc

Error during detector training

Open
#73 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
161
Forks
29
PR merge metrics
No merged PRs in 30d

Description

hello
i faced a problem during detector o my sample

here is the error message, it says i didn't use a negative dataset but actually i used one that is called GeneSwap_Negatives.pfam.tsv
i think deepbgc can't see the negative dataset because of a error o my command. --help didn't tell where or how to put it

  'optimizer': 'adam',
                  'shuffle': True,
                  'timesteps': 256,
                  'validation_size': 0,
                  'verbose': 1,
                  'weighted': True},
'input_params': {   'features': [   {'type': 'ProteinBorderTransformer'},
                                    {   'type': 'Pfam2VecTransformer',
                                        'vector_path': 'pfam2vec.csv'}]},
'type': 'KerasRNN'}

INFO 15/05 09:28:22 Loaded 41102 samples and 80777 domains from sample1_deepbgc_prepare_result.tsv
INFO 15/05 09:28:28 Loaded 10128 samples and 706950 domains from GeneSwap_Negatives.pfam.tsv
ERROR 15/05 09:28:33 Got target variable with only one value {0} in: ['sample1_deepbgc_prepare_result.tsv', 'GeneSwap_Negatives.pfam.tsv']
Traceback (most recent call last):
File "/root/esraa/miniconda3/envs/deepbgcv0.1.29/lib/python3.7/site-packages/deepbgc/main.py", line 113, in main
run(argv)
File "/root/esraa/miniconda3/envs/deepbgcv0.1.29/lib/python3.7/site-packages/deepbgc/main.py", line 102, in run
args.func.run(**args_dict)
File "/root/esraa/miniconda3/envs/deepbgcv0.1.29/lib/python3.7/site-packages/deepbgc/command/train.py", line 60, in run
train_samples, train_y = util.read_samples(inputs, target)
File "/root/esraa/miniconda3/envs/deepbgcv0.1.29/lib/python3.7/site-packages/deepbgc/util.py", line 574, in read_samples
'Did you provide positive and negative samples?')
ValueError: ("Got target variable with only one value {0} in: ['sample1_deepbgc_prepare_result.tsv', 'GeneSwap_Negatives.pfam.tsv']", 'At least two values are required to train a model. ', 'Did you provide positive and negative samples?')
ERROR 15/05 09:28:33 ================================================================================
ERROR 15/05 09:28:33 DeepBGC failed with ValueError: Got target variable with only one value {0} in: ['sample1_deepbgc_prepare_result.tsv', 'GeneSwap_Negatives.pfam.tsv']
ERROR 15/05 09:28:33 ================================================================================
ERROR 15/05 09:28:33 At least two values are required to train a model.
ERROR 15/05 09:28:33 Did you provide positive and negative samples?
ERROR 15/05 09:28:33 ================================================================================

my cmmand:

deepbgc train --model templates/deepbgc.json --output MyDeepBGCDetector.pkl sample1_deepbgc_prepare_result.tsv GeneSwap_Negatives.pfam.tsv --config PFAM2VEC pfam2vec
.csv -v ClusterFinder_Annotated_Contigs.full.gbk

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the shown deepbgc train command, then inspect deepbgc/command/train.py and deepbgc/util.py, especially read_samples, as named in the traceback. Determine how the two TSV inputs are assigned target values and document or correct the behavior so training accepts distinct positive and negative samples.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.