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

Custom resistance probes #137

Closed
arnoldbain opened this issue Oct 31, 2021 · 7 comments
Closed

Custom resistance probes #137

arnoldbain opened this issue Oct 31, 2021 · 7 comments

Comments

@arnoldbain
Copy link

Am trying to create custom resistance probes using this command: "mykrobe variants make-probes -t gene1.txt -g refe/H37Rv4.gbk refe/H37Rv.fasta > probes4.gene.fa" but i get the error below. What might be the issue?
[mykrobe 2021-10-31T15:59:00 WARNING] Could not connect to database. Continuing without using genetic backgrounds
/mnt/transient_data/conda/envs/mykrobe/lib/python3.6/site-packages/Bio/GenBank/Scanner.py:215: BiopythonParserWarning: Over indented /inference="protein feature?
BiopythonParserWarning,
/mnt/transient_data/conda/envs/mykrobe/lib/python3.6/site-packages/Bio/GenBank/init.py:1267: BiopythonParserWarning: Couldn't parse feature location: 'motif:PROSITE:PS00599"'
"Couldn't parse feature location: %r" % location_line
Traceback (most recent call last):
File "/mnt/transient_data/conda/envs/mykrobe/bin/mykrobe", line 11, in
sys.exit(main())
File "/mnt/transient_data/conda/envs/mykrobe/lib/python3.6/site-packages/mykrobe/cli.py", line 8, in main
args.func(parser, args)
File "/mnt/transient_data/conda/envs/mykrobe/lib/python3.6/site-packages/mykrobe/parser.py", line 53, in run_subtool
run(parser, args)
File "/mnt/transient_data/conda/envs/mykrobe/lib/python3.6/site-packages/mykrobe/cmds/makeprobes.py", line 70, in run
gene, mutation_string, protein_coding_var
File "/mnt/transient_data/conda/envs/mykrobe/lib/python3.6/site-packages/mykrobe/annotation/genes/models.py", line 180, in get_variant_names
ref, start, alt = split_var_name(mutation)
File "/mnt/transient_data/conda/envs/mykrobe/lib/python3.6/site-packages/mykrobe/utils.py", line 29, in split_var_name
items = re.match(r"([A-Z]+)([-0-9]+)([A-Z/]+)", name, re.I).groups()
AttributeError: 'NoneType' object has no attribute 'groups'

@iqbal-lab
Copy link
Collaborator

Cc @martinghunt

@martinghunt
Copy link
Member

martinghunt commented Nov 1, 2021

I'd guess that the file gene1.txt is not the right format. The error is being thrown when trying to read a line of that file. Example line:

ileS	D2E	PROT

The error because the second column is not in the expected format of <amino acid><number><amino acid>.

If that's not the reason, then could you please share the input files so I can debug?

@arnoldbain
Copy link
Author

@martinghunt could it be the deletions? thx

gene1.txt

@martinghunt
Copy link
Member

deletions should be ok. Definitely a * in the variant causes that error. If you want * to mean "any other amino acid other than the ref", then use X instead. If you want it to mean "stop codon", then sorry but the only way to do that in mykrobe is to provide the dna variants.

@mbhall88
Copy link
Member

mbhall88 commented Dec 1, 2021

Stop codons are now supported with *. This is on the tip of master and will be in the next release.

@mbhall88 mbhall88 closed this as completed Dec 1, 2021
@iqbal-lab
Copy link
Collaborator

Sorry, how do you encode a deletion with *?. Is this amino, nucleotide or both?

@mbhall88
Copy link
Member

mbhall88 commented Dec 2, 2021

Typo sorry. I meant stop codons. I've edited the above comment.

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

4 participants