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

Input should be a valid string error #416

Open
enes-ak opened this issue Dec 27, 2024 · 0 comments
Open

Input should be a valid string error #416

enes-ak opened this issue Dec 27, 2024 · 0 comments

Comments

@enes-ak
Copy link

enes-ak commented Dec 27, 2024

I am getting this error when I run the TB-profiler. I checked my fasta file and it seems okay. What can be the problem?

Here is my command:
tb-profiler profile --fasta barcode05.fasta -t 12 -p barcode05 --spoligotype --csv

tb-profiler version: 6.2.1



# tb-profiler error report

* OS: linux
* Program version: 6.2.1
* Database version: {'name': 'tbdb', 'commit': '620fb05', 'Author': 'Jody Phelan <jody.phelan@lshtm.ac.uk>', 'Date': 'Mon Oct 14 22:19:31 2024 +0100'}
* Program call:

{'logging': 'INFO', 'read1': None, 'read2': None, 'bam': None, 'fasta': 'barcode05.fasta', 'vcf': '/home/enes/Desktop/bioinfo_pipelines/tb_pipeline/data/raw_fasta/barcode05/78bc9512-b939-48c7-8c14-ffe53f7902d7.vcf.gz', 'platform': 'illumina', 'db': 'tbdb', 'external_db': None, 'prefix': 'barcode05', 'csv': True, 'txt': False, 'text_template': None, 'docx': False, 'docx_template': None, 'add_columns': None, 'add_mutation_metadata': False, 'dir': '/home/enes/Desktop/bioinfo_pipelines/tb_pipeline/data/raw_fasta/barcode05', 'depth': '0,0', 'af': '0,0.1', 'strand': '0,0', 'sv_depth': '0,10', 'sv_af': '0.5,0.9', 'sv_len': '100000,50000', 'mapper': 'bwa', 'caller': 'freebayes', 'calling_params': None, 'kmer_counter': 'kmc', 'coverage_tool': 'samtools', 'suspect': False, 'spoligotype': True, 'update_phylo': False, 'call_whole_genome': False, 'snp_dist': None, 'snp_diff_db': None, 'snp_diff_no_store': False, 'no_trim': False, 'no_coverage_qc': False, 'no_samclip': False, 'no_delly': False, 'no_lineage': False, 'add_variant_annotations': False, 'threads': 12, 'ram': 2, 'delly_vcf': None, 'supplementary_bam': None, 'no_clean': False, 'temp': '.', 'func': <function main_profile at 0x711ea6ed40d0>, 'software_name': 'tbprofiler', 'version': '6.2.1', 'tmp_prefix': '78bc9512-b939-48c7-8c14-ffe53f7902d7', 'files_prefix': '/home/enes/Desktop/bioinfo_pipelines/tb_pipeline/data/raw_fasta/barcode05/78bc9512-b939-48c7-8c14-ffe53f7902d7', 'conf': {'db-schema-version': '1.0.0', 'snpEff_db': 'Mycobacterium_tuberculosis_h37rv', 'drugs': ['rifampicin', 'isoniazid', 'ethambutol', 'pyrazinamide', 'moxifloxacin', 'levofloxacin', 'bedaquiline', 'delamanid', 'pretomanid', 'linezolid', 'streptomycin', 'amikacin', 'kanamycin', 'capreomycin', 'clofazimine', 'ethionamide', 'para-aminosalicylic_acid', 'cycloserine'], 'tb-profiler-version': '>=6.0.0,<7.0.0', 'version': {'name': 'tbdb', 'commit': '620fb05', 'Author': 'Jody Phelan jody.phelan@lshtm.ac.uk', 'Date': 'Mon Oct 14 22:19:31 2024 +0100'}, 'amplicon': False, 'files': {'ref': 'tbdb.fasta', 'gff': 'tbdb.gff', 'bed': 'tbdb.bed', 'json_db': 'tbdb.dr.json', 'variables': 'tbdb.variables.json', 'spoligotype_spacers': 'tbdb.spoligotype_spacers.txt', 'spoligotype_annotations': 'tbdb.spoligotype_list.csv', 'bedmask': 'tbdb.mask.bed', 'barcode': 'tbdb.barcode.bed', 'rules': 'tbdb.rules.txt'}, 'ref': '/home/enes/miniconda3/envs/tools/share/tbprofiler//tbdb.fasta', 'gff': '/home/enes/miniconda3/envs/tools/share/tbprofiler//tbdb.gff', 'bed': '/home/enes/miniconda3/envs/tools/share/tbprofiler//tbdb.bed', 'variables': {'db-schema-version': '1.0.0', 'snpEff_db': 'Mycobacterium_tuberculosis_h37rv', 'drugs': ['rifampicin', 'isoniazid', 'ethambutol', 'pyrazinamide', 'moxifloxacin', 'levofloxacin', 'bedaquiline', 'delamanid', 'pretomanid', 'linezolid', 'streptomycin', 'amikacin', 'kanamycin', 'capreomycin', 'clofazimine', 'ethionamide', 'para-aminosalicylic_acid', 'cycloserine'], 'tb-profiler-version': '>=6.0.0,<7.0.0', 'version': {'name': 'tbdb', 'commit': '620fb05', 'Author': 'Jody Phelan jody.phelan@lshtm.ac.uk', 'Date': 'Mon Oct 14 22:19:31 2024 +0100'}, 'amplicon': False, 'files': {'ref': 'tbdb.fasta', 'gff': 'tbdb.gff', 'bed': 'tbdb.bed', 'json_db': 'tbdb.dr.json', 'variables': 'tbdb.variables.json', 'spoligotype_spacers': 'tbdb.spoligotype_spacers.txt', 'spoligotype_annotations': 'tbdb.spoligotype_list.csv', 'bedmask': 'tbdb.mask.bed', 'barcode': 'tbdb.barcode.bed', 'rules': 'tbdb.rules.txt'}}, 'spoligotype_spacers': '/home/enes/miniconda3/envs/tools/share/tbprofiler//tbdb.spoligotype_spacers.txt', 'spoligotype_annotations': '/home/enes/miniconda3/envs/tools/share/tbprofiler//tbdb.spoligotype_list.csv', 'bedmask': '/home/enes/miniconda3/envs/tools/share/tbprofiler//tbdb.mask.bed', 'barcode': '/home/enes/miniconda3/envs/tools/share/tbprofiler//tbdb.barcode.bed', 'rules': ['Variant(gene_name=mmpL5,type=lof) inactivates_resistance Variant(gene_name=mmpR5)', 'Variant(gene_name=eis,type=lof) inactivates_resistance Variant(gene_name=eis)'], 'variant_filters': {'depth_hard': 0, 'depth_soft': 0, 'af_hard': 0, 'af_soft': 0.1, 'strand_hard': 0, 'strand_soft': 0, 'sv_depth_hard': 0, 'sv_depth_soft': 10, 'sv_af_hard': 0.5, 'sv_af_soft': 0.9, 'sv_len_hard': 100000, 'sv_len_soft': 50000}}, 'run_delly': True, 'samclip': True, 'coverage_qc': True, 'data_source': 'fasta', 'call_lineage': True, 'paf': '/home/enes/Desktop/bioinfo_pipelines/tb_pipeline/data/raw_fasta/barcode05/78bc9512-b939-48c7-8c14-ffe53f7902d7.paf', 'barcode_snps': None}

## Traceback:

File "/home/enes/miniconda3/envs/tools/bin/tb-profiler", line 587, in
args.func(args)
File "/home/enes/miniconda3/envs/tools/bin/tb-profiler", line 118, in main_profile
spoligotype = tbp.spoligotype(args)
File "/home/enes/miniconda3/envs/tools/lib/python3.10/site-packages/tbprofiler/spoligotyping.py", line 20, in spoligotype
return Spoligotype(**result)
File "/home/enes/miniconda3/envs/tools/lib/python3.10/site-packages/pydantic/main.py", line 214, in init
validated_self = self.pydantic_validator.validate_python(data, self_instance=self)

## Value:

3 validation errors for Spoligotype
family
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.10/v/string_type
SIT
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.10/v/string_type
countries
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.10/v/string_type```

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