Closed ryobon-dev closed 1 year ago
Hi @ryobon-dev ,
The --snp_dist
flag expects a integer argument. For example --snp_dist 20
. This will then store all distances <= 20 between pairs of samples.
Thanks for your quick response.
I still have a problem on this. I have attached the error log.
Thanks,
From: Jody Phelan @.> Sent: Monday, July 3, 2023 7:06 PM To: jodyphelan/TBProfiler @.> Cc: ryobon-dev @.>; Mention @.> Subject: Re: [jodyphelan/TBProfiler] error: argument --snp_dist: expected one argument (Issue #290)
Hi @ryobon-dev https://github.com/ryobon-dev ,
The --snp_dist flag expects a integer argument. For example --snp_dist 20. This will then store all distances <= 20 between pairs of samples.
— Reply to this email directly, view it on GitHub https://github.com/jodyphelan/TBProfiler/issues/290#issuecomment-1617787201 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ASU6F6X6AG7DKQHVXGS6S53XOKKQDANCNFSM6AAAAAAZ3FHMQQ . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ASU6F6RWDQGG33Y6U757IOLXOKKQDA5CNFSM6AAAAAAZ3FHMQSWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTANV4UC.gif Message ID: @. @.> >
{'read1': 'FY27KIH243_S11_R1.fastq.gz', 'read2': 'FY27KIH243_S11_R2.fastq.gz', 'bam': None, 'fasta': None, 'vcf': None, 'platform': 'illumina', 'db': 'tbdb', 'external_db': None, 'prefix': 'FY27KIH243', 'csv': False, 'txt': True, 'pdf': False, 'docx': None, 'output_template': None, 'add_columns': None, 'add_mutation_metadata': False, 'dir': '.', 'mapper': 'bwa', 'caller': 'freebayes', 'calling_params': None, 'kmer_counter': 'kmc', 'min_depth': 10, 'af': 0.1, 'reporting_af': 0.1, 'coverage_fraction_threshold': 0, 'missing_cov_threshold': 10, 'suspect': False, 'spoligotype': True, 'call_whole_genome': True, 'snp_dist': 20, 'no_trim': False, 'no_flagstat': False, 'no_clip': True, 'no_delly': False, 'no_lineage': False, 'add_variant_annotations': False, 'threads': 16, 'ram': 2, 'verbose': 0, 'delly_vcf': None, 'no_clean': False, 'temp': '.', 'func': <function main_profile at 0x7fd61f515c10>, 'software_name': 'tbprofiler', 'tmp_prefix': 'fcf17dd7-0593-4a6f-b57e-c82125a0ee8c', 'files_prefix': './fcf17dd7-0593-4a6f-b57e-c82125a0ee8c', 'conf': {'snpEff_db': 'Mycobacterium_tuberculosis_h37rv', 'drugs': ['rifampicin', 'isoniazid', 'ethambutol', 'pyrazinamide', 'streptomycin', 'fluoroquinolones', 'moxifloxacin', 'ofloxacin', 'levofloxacin', 'ciprofloxacin', 'aminoglycosides', 'amikacin', 'capreomycin', 'kanamycin', 'cycloserine', 'ethionamide', 'clofazimine', 'para-aminosalicylic_acid', 'delamanid', 'bedaquiline', 'linezolid'], 'amplicon': False, 'files': {'ref': 'tbdb.fasta', 'gff': 'tbdb.gff', 'bed': 'tbdb.bed', 'version': 'tbdb.version.json', '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'}, 'ref': '/home/kansensho/miniconda3/envs/tb-profiler/share/tbprofiler//tbdb.fasta', 'gff': '/home/kansensho/miniconda3/envs/tb-profiler/share/tbprofiler//tbdb.gff', 'bed': '/home/kansensho/miniconda3/envs/tb-profiler/share/tbprofiler//tbdb.bed', 'version': {'name': 'tbdb', 'commit': 'c2fb9a2', 'Author': 'jodyphelan ***@***.***>', 'Date': 'Tue Oct 4 11:40:15 2022 +0100'}, 'variables': {'snpEff_db': 'Mycobacterium_tuberculosis_h37rv', 'drugs': ['rifampicin', 'isoniazid', 'ethambutol', 'pyrazinamide', 'streptomycin', 'fluoroquinolones', 'moxifloxacin', 'ofloxacin', 'levofloxacin', 'ciprofloxacin', 'aminoglycosides', 'amikacin', 'capreomycin', 'kanamycin', 'cycloserine', 'ethionamide', 'clofazimine', 'para-aminosalicylic_acid', 'delamanid', 'bedaquiline', 'linezolid'], 'amplicon': False, 'files': {'ref': 'tbdb.fasta', 'gff': 'tbdb.gff', 'bed': 'tbdb.bed', 'version': 'tbdb.version.json', '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'}}, 'spoligotype_spacers': '/home/kansensho/miniconda3/envs/tb-profiler/share/tbprofiler//tbdb.spoligotype_spacers.txt', 'spoligotype_annotations': '/home/kansensho/miniconda3/envs/tb-profiler/share/tbprofiler//tbdb.spoligotype_list.csv', 'bedmask': '/home/kansensho/miniconda3/envs/tb-profiler/share/tbprofiler//tbdb.mask.bed', 'barcode': '/home/kansensho/miniconda3/envs/tb-profiler/share/tbprofiler//tbdb.barcode.bed'}, 'run_delly': True, 'bam_file': './fcf17dd7-0593-4a6f-b57e-c82125a0ee8c.bam'}
File "/home/kansensho/miniconda3/envs/tb-profiler/bin/tb-profiler", line 693, in <module>
args.func(args)
File "/home/kansensho/miniconda3/envs/tb-profiler/bin/tb-profiler", line 161, in main_profile
tbp.run_snp_dists(args,results)
File "/home/kansensho/miniconda3/envs/tb-profiler/lib/python3.9/site-packages/tbprofiler/snp_dists.py", line 85, in run_snp_dists
results["close_samples"] = var_set.get_close_samples(os.path.join(args.dir,"results"),cutoff=args.snp_dist)
File "/home/kansensho/miniconda3/envs/tb-profiler/lib/python3.9/site-packages/tbprofiler/snp_dists.py", line 51, in get_close_samples
directory_files = [f for f in os.listdir(dir) if f.endswith(".qkl")]
[Errno 2] No such file or directory: './results'```
Hi,
With your comment, I run the command " tb-profiler profile -1 FY27KIH243_S11_R1.fastq.gz -2 FY27KIH243_S11_R2.fastq.gz -t 16 -p FY27KIH243 --txt --snp_dist 20".
Everything about snp_dist is fine now ! Thanks for your great support.
Hi,
I tried to run --snp_dist but encountered the error in below.
Could you help me to resolve this issue ?
(tb-profiler) kansensho@MAC:/mnt/d/RIT_fastq_20221213_MTBseq$ tb-profiler version
TBProfiler version 4.4.2 (tb-profiler) kansensho@MAC:/mnt/d/RIT_fastq_20221213_MTBseq$ tb-profiler profile -1 FY27KIH243_S11_R1.fastq.gz -2 FY27KIH243_S11_R2.fastq.gz -t 16 -p FY27KIH243 --txt --spoligotype --call_whole_genome --snp_dist usage: tb-profiler profile [-h] [--read1 READ1] [--read2 READ2] [--bam BAM] [--fasta FASTA] [--vcf VCF] [--platform {illumina,nanopore,pacbio}] [--db DB] [--external_db EXTERNAL_DB] [--prefix PREFIX] [--csv] [--txt] [--pdf] [--docx DOCX] [--output_template OUTPUT_TEMPLATE] [--add_columns ADD_COLUMNS] [--dir DIR] [--mapper {bwa,minimap2,bowtie2,bwa-mem2}] [--caller {bcftools,gatk,freebayes,pilon,lofreq}] [--calling_params CALLING_PARAMS] [--kmer_counter {kmc,dsk}] [--min_depth MIN_DEPTH] [--af AF] [--reporting_af REPORTING_AF] [--coverage_fraction_threshold COVERAGE_FRACTION_THRESHOLD] [--missing_cov_threshold MISSING_COV_THRESHOLD] [--suspect] [--spoligotype] [--call_whole_genome] [--snp_dist SNP_DIST] [--no_trim] [--no_flagstat] [--no_clip] [--no_delly] [--threads THREADS] [--ram RAM] [--verbose {0,1,2}] [--temp TEMP] [--version] tb-profiler profile: error: argument --snp_dist: expected one argument (tb-profiler) kansensho@MAC:/mnt/d/RIT_fastq_20221213_MTBseq$